diff options
Diffstat (limited to 'sysdeps/pthread/sem_open.c')
| -rw-r--r-- | sysdeps/pthread/sem_open.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sysdeps/pthread/sem_open.c b/sysdeps/pthread/sem_open.c index 9f242599d5..e5eacb5fed 100644 --- a/sysdeps/pthread/sem_open.c +++ b/sysdeps/pthread/sem_open.c @@ -26,6 +26,7 @@ #include <futex-internal.h> #include <libc-lock.h> + #if !PTHREAD_IN_LIBC /* The private names are not exported from libc. */ # define __link link @@ -57,11 +58,7 @@ __sem_open (const char *name, int oflag, ...) } /* Disable asynchronous cancellation. */ -#ifdef __libc_ptf_call - int state; - __libc_ptf_call (__pthread_setcancelstate, - (PTHREAD_CANCEL_DISABLE, &state), 0); -#endif + int state = __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state); /* If the semaphore object has to exist simply open it. */ if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0) @@ -214,9 +211,7 @@ __sem_open (const char *name, int oflag, ...) } out: -#ifdef __libc_ptf_call - __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); -#endif + __pthread_setcancelstate (state, NULL); return result; } |
