📄 readme11
字号:
Chapter 11 - POSIX Threads.thread1.c - a program to test for thread support. To compile this program, you may need to use the command:cc -D_POSIX_C_SOURCE=199506L thread1.c -o thread1When thread1.c is run, it produces the output, "POSIX version is set to" followed by an integer. If this integeris less than 199506, then you may not be able to compile some or all of the following programs.To compile the following programs, you may need to use the command:cc -D_REENTRANT threadX.c -o threadX -lpthreadthread2.c - a simple program using threads.thread3.c - a program that executes 2 threads simultaneously. You may have to wait a few seconds beforethis program produces output.thread4.c - a program that synchronizes threads using seamphores.thread4a.c - a modified version of thread4.c.thread5.c - a program that synchronizes threads using mutexes.thread6.c - a program that sets a thread's detached state attribute.If the output from thread1.c is less than 199506, then the following programs are particularly likely not tocompile.thread7.c, thread7a.c - two programs that set a thread's scheduling attribute.thread8.c - a program that cancels a thread.thread9.c, thread9a.c - two programs that create many threads.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -