From d012c538c34f8ad709fa31938fe5ad5493784b9e Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 21 Apr 2025 19:47:00 +0300 Subject: [PATCH] LibC: Add PTHREAD_SPIN_INITIALIZER This is not posix, but current implementation allows adding this --- userspace/libraries/LibC/include/pthread.h | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/libraries/LibC/include/pthread.h b/userspace/libraries/LibC/include/pthread.h index 8c512163..a66c8cff 100644 --- a/userspace/libraries/LibC/include/pthread.h +++ b/userspace/libraries/LibC/include/pthread.h @@ -53,6 +53,7 @@ struct uthread #define PTHREAD_MUTEX_NORMAL 2 #define PTHREAD_MUTEX_RECURSIVE 3 +#define PTHREAD_SPIN_INITIALIZER (pthread_spinlock_t)0 #define PTHREAD_COND_INITIALIZER (pthread_cond_t)0 #define PTHREAD_MUTEX_INITIALIZER (pthread_mutex_t){ { PTHREAD_MUTEX_DEFAULT, false }, 0, 0 } #define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t){ { false }, 0, 0 }