__FSETLOCKING(3)

NAME
__fsetlocking - set or query locking mode on FILE stream

SYNOPSIS

#include <stdio.h>

#include <stdio_ext.h>

int __fsetlocking(FILE *fp, int type);

DESCRIPTION

This function sets how the stdio functions handle locking of FILE fp. The following values describe type:

FSETLOCKING_INTERNAL is the default state, where stdio functions automatically lock and unlock the stream.

FSETLOCKING_BYCALLER means that automatic locking in stdio functions is disabled. Applications which set this take all responsibility for file locking themselves.

FSETLOCKING_QUERY returns the current locking mode without changing it.

RETURNS

__fsetlocking returns the current locking mode of fp.

PORTABILITY

This function originates from Solaris and is also provided by GNU libc.

No supporting OS subroutines are required.