⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tident.c

📁 linux 多线程例子
💻 C
字号:
/******************************************************** * An example source module to accompany... * * "Using POSIX Threads: Programming with Pthreads" *     by Brad nichols, Dick Buttlar, Jackie Farrell *     O'Reilly & Associates, Inc. * ******************************************************** * ident.c * * Demonstrate use of pthread_self() and pthread_equal() */#include <pthread.h>pthread_t io_thread;void * io_routine(void *notused){  pthread_t thread;  thread = pthread_self();  if (pthread_equal(io_thread, thread))     printf("hey it is me!\n");  else     printf("thats\' not me!\n");	  return(NULL);}main(){  extern pthread_t io_thread;  pthread_create(&io_thread,		 NULL,		 io_routine,		 NULL);  pthread_join(io_thread, NULL);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -