Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
Multithreaded source code
no vote
Thread follows the POSIX threads interface, Linux system, known as the pthread. Writing multithreaded programs under Linux, you need to use header file pthread.h, libpthread.a is required when connecting. Therefore, subsequent compilations must be option added-lpthread option, otherwise prompt for pthread_create () function. Pthread implementation is through the system call under Linux clone () to achieve. Clone () is unique to the Linux system calls.   2, pthread_t is a thread identifier, creating threads using pthread_create (), waiting for the thread to finish using the function prototype: int pthread_create (pthread_t *thread, pthread_attr_t *attr, void * (*start_routine) (void *), void *arg); The first parameter is a pointer to the thread identifier, and the second is used to set the thread attribute, and the third parameter is the thread running the starting address of the function, the last one is running argument of a function
wangjie1234588
2016-08-23
0
1
No more~