17c2fbfb3SApril Chin /*********************************************************************** 27c2fbfb3SApril Chin * * 37c2fbfb3SApril Chin * This software is part of the ast package * 4*3e14f97fSRoger A. Faulkner * Copyright (c) 1985-2010 AT&T Intellectual Property * 57c2fbfb3SApril Chin * and is licensed under the * 67c2fbfb3SApril Chin * Common Public License, Version 1.0 * 77c2fbfb3SApril Chin * by AT&T Intellectual Property * 87c2fbfb3SApril Chin * * 97c2fbfb3SApril Chin * A copy of the License is available at * 107c2fbfb3SApril Chin * http://www.opensource.org/licenses/cpl1.0.txt * 117c2fbfb3SApril Chin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 127c2fbfb3SApril Chin * * 137c2fbfb3SApril Chin * Information and Software Systems Research * 147c2fbfb3SApril Chin * AT&T Research * 157c2fbfb3SApril Chin * Florham Park NJ * 167c2fbfb3SApril Chin * * 177c2fbfb3SApril Chin * Glenn Fowler <gsf@research.att.com> * 187c2fbfb3SApril Chin * David Korn <dgk@research.att.com> * 197c2fbfb3SApril Chin * Phong Vo <kpv@research.att.com> * 207c2fbfb3SApril Chin * * 217c2fbfb3SApril Chin ***********************************************************************/ 227c2fbfb3SApril Chin #pragma prototyped 237c2fbfb3SApril Chin 247c2fbfb3SApril Chin #include "stdhdr.h" 257c2fbfb3SApril Chin 267c2fbfb3SApril Chin int ftrylockfile(Sfio_t * f)277c2fbfb3SApril Chinftrylockfile(Sfio_t* f) 287c2fbfb3SApril Chin { 297c2fbfb3SApril Chin STDIO_INT(f, "ftrylockfile", int, (Sfio_t*), (f)) 307c2fbfb3SApril Chin 317c2fbfb3SApril Chin return sfmutex(f, SFMTX_TRYLOCK); 327c2fbfb3SApril Chin } 33