void rewind(FILE* stream) { g_atomic_lock(&stream->lock); __fseeko_unlocked(stream, 0, SEEK_SET); __clearerr_unlocked(stream); stream->lock = 0; }
int __fseeko(FILE *f, off_t off, int whence) { int result; FLOCK(f); result = __fseeko_unlocked(f, off, whence); FUNLOCK(f); return result; }