Ticket #8798: 0001-pthread.h-Add-PTHREAD_RWLOCK_INITIALIZER-macro.patch

File 0001-pthread.h-Add-PTHREAD_RWLOCK_INITIALIZER-macro.patch, 732 bytes (added by return_0e, 7 years ago)

Patch to define PTHREAD_RWLOCK_INITIALIZER

  • headers/posix/pthread.h

    From bbabec9d82f190480c963e2f8d96fdd7c99d2554 Mon Sep 17 00:00:00 2001
    From: "Joseph C, Hill" <calvin@hakobaito.co.uk>
    Date: Sat, 27 May 2017 14:35:25 +0100
    Subject: [PATCH] pthread.h: Add PTHREAD_RWLOCK_INITIALIZER macro.
    
    ---
     headers/posix/pthread.h | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/headers/posix/pthread.h b/headers/posix/pthread.h
    index 489aace..8172d62 100644
    a b extern "C" {  
    8080    { PTHREAD_MUTEX_RECURSIVE, 0, -42, -1, 0 }
    8181#define PTHREAD_COND_INITIALIZER    \
    8282    { 0, -42, NULL, 0, 0 }
     83#define PTHREAD_RWLOCK_INITIALIZER \
     84    {0, 0, NULL}
    8385
    8486/* mutex functions */
    8587extern int pthread_mutex_destroy(pthread_mutex_t *mutex);