Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Communications and Networking COMP 2330 Laboratory 6 Mr. Wilman ZOU Please sign your name with your attendance.

Similar presentations


Presentation on theme: "Data Communications and Networking COMP 2330 Laboratory 6 Mr. Wilman ZOU Please sign your name with your attendance."— Presentation transcript:

1 Data Communications and Networking COMP 2330 Laboratory 6 Mr. Wilman ZOU Please sign your name with your attendance

2 Job 1 Job 2 Job 3 Single Thread Job 2 Job 1 Job 3 Multi-thread Job1,job2,job3

3 Some functions _beginthread() –To create a new thread; –uintptr_t _beginthread( void( *start_address )( void * ), unsigned stack_size, void *arglist ); void( *start_address )( void * ): a point to the function/ unsigned stack_size: specify the size of the stack for the created thread void *arglist: the pointer of arguments list

4 Some functions fflush() –To clean the buffer, –int fflush( FILE *stream ); FILE *stream: a pointer to FILE structure, this FILE structure will base on a buffer When fflush try to clean the buffer, the system will first conduct the commands to treat the data in buffer Intuitively, fflush() after printf() means that display the printf() result without delay


Download ppt "Data Communications and Networking COMP 2330 Laboratory 6 Mr. Wilman ZOU Please sign your name with your attendance."

Similar presentations


Ads by Google