[Previous] [Contents] [Next]

ftrylockfile()

Acquire ownership of a FILE object

Synopsis:

#include <stdio.h>

int ftrylockfile( FILE* file );

Library:

libc

Description:

The ftrylockfile() function is used by a thread to acquire ownership of a FILE if the object is available; ftrylockfile() is a nonblocking version of flockfile().

For more information about ftrylockfile(), see flockfile().

Returns:

0
Success.
Nonzero
The lock can't be acquired.

Classification:

POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

flockfile(), getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked()


[Previous] [Contents] [Next]