30 lines
		
	
	
		
			383 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			383 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef mythread_h__
 | 
						|
#define mythread_h__
 | 
						|
 | 
						|
 | 
						|
#include "pthread.h"
 | 
						|
#include "exception.h"
 | 
						|
 | 
						|
 | 
						|
typedef struct _myth_def{
 | 
						|
  struct _myth_def *next;
 | 
						|
  struct _myth_def *last;
 | 
						|
  pthread_t th;
 | 
						|
  exception_def except;
 | 
						|
  size_t id;
 | 
						|
  size_t end;
 | 
						|
  int (*func)(void *);
 | 
						|
  void *arg;
 | 
						|
}myth_def;
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
int myth_create(int (*func)(void *t),void *t);
 | 
						|
int myth_join();
 | 
						|
myth_def *myth_self();
 | 
						|
 | 
						|
 | 
						|
#endif
 |