]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.3.2/pthread-cleanup.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.3.2 / pthread-cleanup.patch
1 --- linuxthreads/forward.c      2 Sep 2003 00:37:04 -0000       1.5
2 +++ linuxthreads/forward.c      18 Sep 2003 23:36:32 -0000
3 @@ -173,3 +173,7 @@
4          0)
5  
6  FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
7 +
8 +FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
9 +
10 +FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
11 --- linuxthreads/pthread.c      17 Sep 2003 09:39:16 -0000      1.130
12 +++ linuxthreads/pthread.c      18 Sep 2003 23:36:32 -0000
13 @@ -279,7 +279,9 @@
14      .ptr_pthread_cleanup_upto = __pthread_cleanup_upto,
15      .ptr_pthread_sigaction = __pthread_sigaction,
16      .ptr_pthread_sigwait = __pthread_sigwait,
17 -    .ptr_pthread_raise = __pthread_raise
18 +    .ptr_pthread_raise = __pthread_raise,
19 +    .ptr__pthread_cleanup_push = _pthread_cleanup_push,
20 +    .ptr__pthread_cleanup_pop = _pthread_cleanup_pop
21    };
22  #ifdef SHARED
23  # define ptr_pthread_functions &__pthread_functions
24 --- linuxthreads/sysdeps/pthread/pthread-functions.h    10 Sep 2003 22:27:19 -0000      1.3
25 +++ linuxthreads/sysdeps/pthread/pthread-functions.h    18 Sep 2003 23:36:33 -0000
26 @@ -83,6 +83,11 @@
27    int (*ptr_pthread_raise) (int sig);
28    int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
29                                        const struct timespec *);
30 +  void (*ptr__pthread_cleanup_push) (struct _pthread_cleanup_buffer * buffer,
31 +                                    void (*routine)(void *), void * arg);
32 +
33 +  void (*ptr__pthread_cleanup_pop) (struct _pthread_cleanup_buffer * buffer,
34 +                                   int execute);
35  };
36  
37  /* Variable in libc.so.  */
38 --- linuxthreads/sysdeps/pthread/bits/libc-lock.h       8 Aug 2003 07:40:17 -0000       1.31
39 +++ linuxthreads/sysdeps/pthread/bits/libc-lock.h       18 Sep 2003 23:36:33 -0000
40 @@ -265,18 +265,12 @@
41      }
42  
43  #define __libc_cleanup_push(fct, arg) \
44 -  { struct _pthread_cleanup_buffer _buffer;                                  \
45 -    int _avail = _pthread_cleanup_push != NULL;                                      \
46 -    if (_avail) {                                                            \
47 -      _pthread_cleanup_push (&_buffer, (fct), (arg));                        \
48 -    }
49 +    { struct _pthread_cleanup_buffer _buffer;                                \
50 +    __libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
51  
52  #define __libc_cleanup_pop(execute) \
53 -    if (_avail) {                                                            \
54 -      _pthread_cleanup_pop (&_buffer, execute);                                      \
55 -    }                                                                        \
56 -  }
57 -
58 +    __libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0);        \
59 +    }
60  
61  /* Create thread-specific key.  */
62  #define __libc_key_create(KEY, DESTRUCTOR) \