X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Finternal%2Flibc.h;h=115cd8653b78246cb5835e408a19c95f4f21ef8e;hp=e81ef7609f466d4dc2fa1b068acbc7cb87d9eaa6;hb=407d933052c310ebc5541dae2ecd8c4bd8f55fb9;hpb=41d518360fd2da0f19d6a2f8d8c5f226b201c1e9 diff --git a/src/internal/libc.h b/src/internal/libc.h index e81ef760..115cd865 100644 --- a/src/internal/libc.h +++ b/src/internal/libc.h @@ -5,16 +5,15 @@ #include struct __libc { - void (*lock)(volatile int *); - void (*cancelpt)(int); + void *main_thread; + int threaded; + int canceldisable; int (*atexit)(void (*)(void)); void (*fini)(void); void (*ldso_fini)(void); - int *(*errno_location)(void); volatile int threads_minus_1; - int (*rsyscall)(int, long, long, long, long, long, long); - void (**tsd_keys)(void *); - void (*fork_handler)(int); + int ofl_lock; + FILE *ofl_head; }; @@ -36,11 +35,14 @@ extern struct __libc *__libc_loc(void) __attribute__((const)); /* Designed to avoid any overhead in non-threaded processes */ void __lock(volatile int *); +int __lockfile(FILE *); +void __unlockfile(FILE *); #define LOCK(x) (libc.threads_minus_1 ? (__lock(x),1) : ((void)(x),1)) -#define UNLOCK(x) (*(x)=0) -#define CANCELPT(x) (libc.cancelpt ? libc.cancelpt((x)),0 : (void)(x),0) -#define CANCELPT_BEGIN CANCELPT(1) -#define CANCELPT_END CANCELPT(0) +#define UNLOCK(x) (*(volatile int *)(x)=0) + +void __synccall(void (*)(void *), void *); +void __synccall_wait(void); +int __setxid(int, int, int, int); extern char **__environ; #define environ __environ