Home Article Practice 进程、线程

进程、线程

2023-03-23 13:36  views:693  source:小键人13156198    

unistd.h stdio.h main argc argv sleep(1); while printf(""); pid_t fork(void); void e
xit(int status);void _exit(int status); pid_t wait(int *status); #include <sys/wait.h
> #include <pthread.h> int pthread_create(pthread_t *thread, const pthread_attr_t *att
r, void *(*routine)(void *), void *arg);void pthread_exit(void *retval); pthread_t pthr
ead_self(void); pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*rou
tine)(void *), void *arg); int pthread_join(pthread_t thread, void **retval);int pthre
ad_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t * attr);int pthread_mu
tex_destroy(pthread_mutex_t *mutex) int pthread_mutex_lock(pthread_mutex_t *mutex);int p
thread_mutex_unlock(pthread_mutex_t *mutex);int pthread_cond_wait(pthread_cond_t *restrict
cond, pthread_mutex_t *restrict mutex);int pthread_cond_timedwait(pthread_cond_t *restri
ct cond,​ pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime);int pt
hread_cond_signal(pthread_cond_t *cond);int pthread_cond_broadcast(pthread_cond_t *cond);



Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.

字符:    改为:
去打字就可以设置个性皮肤啦!(O ^ ~ ^ O)