LibC: Define pthread_{equal,self} as macros

These really should get inlined :D
This commit is contained in:
2026-04-21 00:25:16 +03:00
parent 8665195350
commit 558ed8fd44
2 changed files with 19 additions and 12 deletions

View File

@@ -169,6 +169,12 @@ void pthread_testcancel(void);
void pthread_cleanup_pop(int execute);
void pthread_cleanup_push(void (*routine)(void*), void* arg);
#define _pthread_equal(t1, t2) ((t1) == (t2))
#define pthread_equal(t1, t2) _pthread_equal(t1, t2)
#define _pthread_self() (_get_uthread()->id)
#define pthread_self() _pthread_self()
#define _pthread_testcancel() do { \
struct uthread* uthread = _get_uthread(); \
if (__builtin_expect(uthread->cancel_state == PTHREAD_CANCEL_ENABLE, 1)) \