2006-02-19から1日間の記事一覧

multiprocess in C++ with Windows

ついでにプロセス関係も、ってことでmutexとsemaphore。 #include <windows.h> #include <string> namespace multiprocess { // mutex ----------------------------------------------------------------- class mutex { HANDLE m_handle; std::string m_name; public: // 生成</string></windows.h>…

multithread in C++ with Windows

Windowsのスレッド関係のAPIのラッパクラスを書いてみた。こんなことしなくてもpthreadやboost::threadあたり使えばいいんだけど、勉強のために。 #include <windows.h> #include <cassert> #include <process.h> namespace multithread { typedef unsigned (__stdcall * thread_func_t)(voi</process.h></cassert></windows.h>…