[PR]

水無瀬の部屋 > Programming > sample > tools > workthrd > workthrd.h
最終更新日: 2007/10/24

   1: //*********************************************************
   2: // プロジェクト: TOOLS :: Worker Thread
   3: //   ファイル名: workthrd.h
   4: //*********************************************************
   5: #ifndef WORKTHRD_HEAD_INCLUDED
   6: #define WORKTHRD_HEAD_INCLUDED
   7: 
   8: 
   9: //*********************************************************
  10: // ヘッダ の インクルード
  11: //*********************************************************
  12: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // 冗長ガード
  13: #include <header/_tools.h>
  14: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // ガード名の検査
  15: #error "? PRIVATE_TOOLS_HEAD_INCLUDED"
  16: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
  17: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
  18: 
  19: 
  20: //*********************************************************
  21: // 構造体 の 宣言
  22: //*********************************************************
  23: typedef struct thread_tag thread_t;
  24: typedef DWORD (WINAPI *WorkerThreadProc_t)( thread_t *thread, void *param );
  25: 
  26: 
  27: //*********************************************************
  28: // 関数 の 宣言
  29: //*********************************************************
  30: #ifdef __cplusplus
  31: extern "C" {
  32: #endif
  33: 
  34: 
  35: // workthrd.cpp
  36: thread_t *CreateWorkerThread( WorkerThreadProc_t proc, void *param );
  37: bool      DestroyWorkerThread( thread_t *thread );
  38: bool      IsValidWorkerThread( const thread_t *thread );
  39: bool      IsWorkerThreadFinished( const thread_t *thread );
  40: bool      IsWorkerThreadCanceled( const thread_t *thread );
  41: bool      WaitWorkerThreadSignal( const thread_t *thread );
  42: bool      ResumeWorkerThread( thread_t *thread );
  43: bool      CancelWorkerThread( thread_t *thread );
  44: 
  45: // GetWorkerThreadCancelEventHandle()
  46: // この関数を利用したコードの排除が完了するまでの一時しのぎ
  47: #ifdef USE_GETWORKERTHREADCANCELEVENTHANDLE
  48: #pragma memo( "GetWorkerThreadCancelEventHandle() を使用します。" )
  49: HANDLE    GetWorkerThreadCancelEventHandle( const thread_t *thread );
  50: #endif // #ifndef USE_RAND
  51: 
  52: 
  53: #ifdef __cplusplus
  54: } // extern "C"
  55: #endif
  56: 
  57: 
  58: #endif // #ifndef WORKTHRD_HEAD_INCLUDED
  59: 
  60: 
  61: //** end **
  62: 

参照: traythrd.cpp, traythrd.h, workthrd.cpp


Google
ご意見・ご感想をお聞かせ下さい。匿名で送信できます。

 * 返信が必要な場合には postmaster@katsura-kotonoha.sakura.ne.jp へ直接メールしてください。

水無瀬の部屋 > sample > tools > workthrd > workthrd.h

このページは cpp2web が出力しました。
水無瀬 優 postmaster@katsura-kotonoha.sakura.ne.jp
http://katsura-kotonoha.sakura.ne.jp/prog/code/tools/workthrd/workthrd_h.shtml
『新妻LOVELY×CATION』を応援しています!