pthread.h 444 B

12345678910111213141516171819
  1. #pragma once
  2. #include <stdint.h>
  3. #include <syscall.h>
  4. typedef struct {
  5. uint32_t id;
  6. char * stack;
  7. void * ret_val;
  8. } pthread_t;
  9. typedef unsigned int pthread_attr_t;
  10. extern int pthread_create(pthread_t * thread, pthread_attr_t * attr, void *(*start_routine)(void *), void * arg);
  11. extern void pthread_exit(void * value);
  12. extern int pthread_kill(pthread_t thread, int sig);
  13. extern int clone(uintptr_t,uintptr_t,void*);
  14. extern int gettid();