일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- programming_book
- QT
- Book review
- leadership
- Malaysia
- Kuala Lumpur
- hadoop
- Java
- program
- history
- ubuntu
- hbase
- France
- MySQL
- web
- django
- management
- Software Engineering
- Spain
- agile
- Book
- RFID
- Programming
- comic agile
- Python
- erlang
- Linux
- psychology
- essay
- Italy
- 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..