#ifndef __MTHREAD_H__
#define __MTHREAD_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <stdarg.h>
#include <error.h>
#include <errno.h>
#include <time.h>
#include <signal.h> 
#include <pthread.h>
#include <semaphore.h>
#include <sys/time.h>  //struct timeval
#include <termios.h>
#include <netdb.h> // struct addrinfo
#include <sys/sem.h>

typedef struct tc_thread
{
    pthread_t thread_id;
    pthread_attr_t attr;
    struct sched_param param;
    void* (*entry)(void *argv);
    void *self;
}mthread_t;

void mthread_init(mthread_t* thread, void* (*entry)(void*), void* argv);

void mthread_exit(mthread_t* thread);


#endif//__MTHREAD_H__
