Back to index

cell-binutils  2.17cvs20070401
Functions
fopen_unlocked.c File Reference
#include <stdio.h>
#include "libiberty.h"

Go to the source code of this file.

Functions

static void unlock_1 (FILE *const fp ATTRIBUTE_UNUSED)
void unlock_stream (FILE *fp)
void unlock_std_streams (void)
FILE * fopen_unlocked (const char *path, const char *mode)
FILE * fdopen_unlocked (int fildes, const char *mode)
FILE * freopen_unlocked (const char *path, const char *mode, FILE *stream)

Function Documentation

FILE* fdopen_unlocked ( int  fildes,
const char *  mode 
)

Definition at line 113 of file fopen_unlocked.c.

{
  FILE *const fp = fdopen (fildes, mode);
  unlock_1 (fp);
  return fp;
}

Here is the call graph for this function:

FILE* fopen_unlocked ( const char *  path,
const char *  mode 
)

Definition at line 105 of file fopen_unlocked.c.

{
  FILE *const fp = fopen (path, mode);
  unlock_1 (fp);
  return fp;
}

Here is the call graph for this function:

FILE* freopen_unlocked ( const char *  path,
const char *  mode,
FILE *  stream 
)

Definition at line 121 of file fopen_unlocked.c.

{
  FILE *const fp = freopen (path, mode, stream);
  unlock_1 (fp);
  return fp;
}

Here is the call graph for this function:

static void unlock_1 ( FILE *const fp  ATTRIBUTE_UNUSED) [inline, static]

Definition at line 82 of file fopen_unlocked.c.

{
#if defined(HAVE___FSETLOCKING) && defined(FSETLOCKING_BYCALLER)
  if (fp)
    __fsetlocking (fp, FSETLOCKING_BYCALLER);
#endif
}

Here is the caller graph for this function:

void unlock_std_streams ( void  )

Definition at line 97 of file fopen_unlocked.c.

{
  unlock_1 (stdin);
  unlock_1 (stdout);
  unlock_1 (stderr);
}

Here is the call graph for this function:

void unlock_stream ( FILE *  fp)

Definition at line 91 of file fopen_unlocked.c.

{
  unlock_1 (fp);
}

Here is the call graph for this function: