TheRyuu / pw32threads

Pthread wrapper for w32threads

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pw32threads - A pthreads wrapper for w32threads 
Inspired by mpw6g.

Takes the pthreads wrapper for w32threads from x264 and makes it a little more generic to allow use 
as a lib.  Removes the limitation of Vista+ from mpw6g.

I honestly don't see much use for this other that situations when linking to pthreads-w32 has
problems (like msvc x64 linking of mingw static libs, if you are doing this add -D_SYSCRT to 
the cflags).

Because w32threads from x264 is gpl this too much be gpl.
If you would like this relicensed to lgpl contact me.

Speed is identical to pthreads-w32.

To Compile (same as mpw6g):

CROSS_PREFIX=x86_64-w64-mingw32-
INSTALL_PREFIX=/mingw
all:
    $(CROSS_PREFIX)gcc -std=c99 -o pthread.o -c pthread.c -Wall -O2
    $(CROSS_PREFIX)ar cru libpthread.a pthread.o
    cp libpthread.a $(INSTALL_PREFIX)/lib
    cp pthread.h $(INSTALL_PREFIX)/include

About

Pthread wrapper for w32threads

License:GNU General Public License v2.0


Languages

Language:C 100.0%