/*
 * mythreadhreads.h - define a interface para o pacote de threads n�o preemptivas
 *                vide o enunciado do TP para os detalhes
 */

#ifndef _MYHREAD_H_
#define _MYHREAD_H_

#define SCHED_RR 1
#define SCHED_PRIO 2

typedef int mythread_t;

typedef void (*mythread_func)(void*);

void       mythread_init(int sched_type);
mythread_t mythread_create(mythread_func f, void* param, int sched_info);
mythread_t mythread_self(void);
void       mythread_yield(void);
void       mythread_exit(void);
void       mythread_suspend(void);
int        mythread_reactivate(mythread_t athread);
void       mythread_destroy(mythread_t athread);
int        mythread_join(mythread_t tr);
int        mythread_join_all(void);

#endif /* _MYHREAD_H_ */
