/[hurd]/hurd-l4/libpthread/pthread/pt-dealloc.c
ViewVC logotype

Diff of /hurd-l4/libpthread/pthread/pt-dealloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by marcus, Thu Mar 18 02:44:20 2004 UTC revision 1.2 by marcus, Mon Nov 1 17:04:00 2004 UTC
# Line 23  Line 23 
23    
24  #include <pt-internal.h>  #include <pt-internal.h>
25    
26  #include <bits/atomic.h>  #include <atomic.h>
27    
28  /* List of thread structures corresponding to free thread IDs.  */  /* List of thread structures corresponding to free thread IDs.  */
29  extern __atomicptr_t __pthread_free_threads;  extern uatomicptr_t __pthread_free_threads;
30    
31  /* Deallocate the thread structure for PTHREAD and the resources  /* Deallocate the thread structure for PTHREAD and the resources
32     associated with it.  */     associated with it.  */
# Line 54  __pthread_dealloc (struct __pthread *pth Line 54  __pthread_dealloc (struct __pthread *pth
54    while (1)    while (1)
55      {      {
56        pthread->next = (struct __pthread *)__pthread_free_threads;        pthread->next = (struct __pthread *)__pthread_free_threads;
57        if (__atomicptr_compare_and_swap (&__pthread_free_threads,        if (atomic_compare_and_exchange_val_acq (&__pthread_free_threads,
58                                          pthread->next, pthread))                                                 pthread->next, pthread))
59          return;          return;
60      }      }
61    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26