일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- Book review
- django
- MySQL
- Book
- program
- erlang
- Malaysia
- Spain
- management
- comic agile
- Programming
- hadoop
- leadership
- France
- programming_book
- hbase
- essay
- web
- Linux
- Python
- Artificial Intelligence
- agile
- ubuntu
- Italy
- RFID
- Kuala Lumpur
- QT
- history
- Java
- Software Engineering
- Today
- Total
목록pthread (2)
출처: http://yesarang.tistory.com/70 //Runnable.h #ifndef_RUNNABLE_H #define_RUNNABLE_H class Runnable{ public: virtual void Run() = 0; }; #endif //Thread.h #ifndef_THREAD_H #define_THREAD_H #include "Runnable.h" class Thread:public Runnable{ public: Thread(); Thread(Runnable* pRunnable); void Start(); void Wait(); virtual void Run(); private: pthread_t_thread; Runnable*_runnable; static void* Mai..
//pthread1.c #include #include #include pthread_tthreads[5]; intdone[5]; void* thread_main(void*); //http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Thread/Beginning/PthreadApiReference //http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Thread/Beginning/Example_pthread //gcc -o pthread1 pthread1.c -lpthread int main(void) { inti, rc, status; printf("pid = %d\n", getpid()); for ( i = 0..