Esempio n. 1
0
int fputc(int c, FILE* f) {
    if (atomic_load(&f->lock) < 0 || !__lockfile(f))
        return putc_unlocked(c, f);
    c = putc_unlocked(c, f);
    __unlockfile(f);
    return c;
}
Esempio n. 2
0
File: fputc.c Progetto: GregorR/musl
int fputc(int c, FILE *f)
{
	if (f->lock < 0 || !__lockfile(f))
		return putc_unlocked(c, f);
	c = putc_unlocked(c, f);
	__unlockfile(f);
	return c;
}
Esempio n. 3
0
int fgetc(FILE* f) {
    int c;
    if (atomic_load(&f->lock) < 0 || !__lockfile(f))
        return getc_unlocked(f);
    c = getc_unlocked(f);
    __unlockfile(f);
    return c;
}
Esempio n. 4
0
File: fputc.c Progetto: Zabrane/osv
int fputc(int c, FILE *f)
{
	if (f->lock_owner == STDIO_SINGLETHREADED || !__lockfile(f))
		return putc_unlocked(c, f);
	c = putc_unlocked(c, f);
	__unlockfile(f);
	return c;
}
Esempio n. 5
0
int fgetc(FILE* f) {
  int c;
  if (f->lock < 0 || !__lockfile(f))
    return getc_unlocked(f);
  c = getc_unlocked(f);
  __unlockfile(f);
  return c;
}
Esempio n. 6
0
File: getc.c Progetto: 151706061/osv
int getc(FILE *f)
{
	int c;
	if (f->no_locking || !__lockfile(f))
		return getc_unlocked(f);
	c = getc_unlocked(f);
	__unlockfile(f);
	return c;
}