TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

tsp_mtgprof.h

00001 /* 
00002  * pthread_create wrapper for gprof compatibility
00003  * Provided by Samuel Hocevar at http://sam.zoy.org/doc/programming/gprof.html
00004  *
00005  * needed headers: <pthread.h>
00006  *                 <sys/time.h>
00007  */
00008 
00009 #include <pthread.h>
00010 #include <sys/time.h>
00011 
00012 #ifndef __TSP_MTGPROG
00013 #define __TSP_MTGPROG 1
00014 
00015 #ifndef VXWORKS
00016 typedef struct wrapper_s
00017 {
00018     void * (*start_routine)(void *);
00019     void * arg;
00020 
00021     pthread_mutex_t lock;
00022     pthread_cond_t  wait;
00023 
00024     struct itimerval itimer;
00025 
00026 } wrapper_t;
00027 
00028 static void * wrapper_routine(void *);
00029 
00030 int gprof_pthread_create(pthread_t * thread, pthread_attr_t * attr,
00031                          void * (*start_routine)(void *), void * arg);
00032 
00033 #endif /* VXWORKS */
00034 
00035 #endif /* __TSP_MTGPROG */
Framework Home Page.

Beware !! TSP wave is coming...