Skip to content

Instantly share code, notes, and snippets.

@shanewfx
shanewfx / log
Created March 9, 2012 08:22
simple log tool for debug
//=====================================================
//simple log tool for debug
//=====================================================
#ifndef _LOGTOOL_H_
#define _LOGTOOL_H_
#include <stdio.h>
#include <windows.h>
@shanewfx
shanewfx / Queue
Created March 10, 2012 00:09
Loop Queue
// CQueue
//
// Implements a simple Queue ADT. The queue contains a finite number of
// objects, access to which is controlled by a semaphore. The semaphore
// is created with an initial count (N). Each time an object is added
// a call to WaitForSingleObject is made on the semaphore's handle. When
// this function returns a slot has been reserved in the queue for the new
// object. If no slots are available the function blocks until one becomes
// available. Each time an object is removed from the queue ReleaseSemaphore
// is called on the semaphore's handle, thus freeing a slot in the queue.
@shanewfx
shanewfx / compile_boost_1_49_0.bat
Created March 17, 2012 13:04
Compile Boost_v1.49.0 Batch
em @echo off
rem 先编译bjam
start bootstrap.bat
rem 等待一分钟待bjam编译完成(如果电脑性能过差,可以设置等待时间更长一些)
SET SLEEP=ping 127.0.0.1 -n
%SLEEP% 60 > nul
rem 利用bjam编译boost库