Multithreaded source code
2016-08-23
0 0 0
no vote
Other
Earn points
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
c
线程
源代码
Related Source Codes
PClite
0
0
no vote
generic embeded FTP Client
0
0
no vote
UDP Test Demo
0
0
no vote
TMS320F28335 DSP transmits data to EEPROM through
0
0
no vote
TMS320F28335 CAN communication source code
0
0
no vote
No comment