[gforth] / gforth / unix / pthread.fs  

gforth: gforth/unix/pthread.fs

Diff for /gforth/unix/pthread.fs between version 1.16 and 1.17

version 1.16, Sat Mar 17 01:45:12 2012 UTC version 1.17, Sat Mar 17 19:23:40 2012 UTC
Line 101 
Line 101 
     \c   munmap(t, size);      \c   munmap(t, size);
     \c }      \c }
     \c      \c
       \c #ifdef HAS_BACKLINK
     \c extern __thread jmp_buf throw_jmp_buf;      \c extern __thread jmp_buf throw_jmp_buf;
       \c #else
       \c __thread jmp_buf throw_jmp_buf;
       \c static void ** gf_pointers;
       \c #endif
     \c      \c
     \c void *gforth_thread(user_area * t)      \c void *gforth_thread(user_area * t)
     \c {      \c {
     \c   void *x;      \c   void *x;
     \c   int throw_code;      \c   int throw_code;
       \c   void ** gforth_pointers = gf_pointers;
     \c   pthread_cleanup_push(&gforth_cleanup_thread, (void*)t);      \c   pthread_cleanup_push(&gforth_cleanup_thread, (void*)t);
     \c      \c
     \c   if ((throw_code=setjmp(throw_jmp_buf))) {      \c   if ((throw_code=setjmp(throw_jmp_buf))) {
Line 124 
Line 130 
     \c   pthread_cleanup_pop(1);      \c   pthread_cleanup_pop(1);
     \c   return x;      \c   return x;
     \c }      \c }
       \c #ifdef HAS_BACKLINK
     \c void *gforth_thread_p()      \c void *gforth_thread_p()
     \c {      \c {
     \c   return (void*)&gforth_thread;      \c   return (void*)&gforth_thread;
     \c }      \c }
       \c #else
       \c #define gforth_thread_p() gforth_thread_ptr(gforth_pointers)
       \c void *gforth_thread_ptr(GFORTH_ARGS)
       \c {
       \c   gf_pointers=gforth_pointers;
       \c   return (void*)&gforth_thread;
       \c }
       \c #endif
     \c void *pthread_plus(void * thread)      \c void *pthread_plus(void * thread)
     \c {      \c {
     \c   return thread+sizeof(pthread_t);      \c   return thread+sizeof(pthread_t);


Generate output suitable for use with a patch program
Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help