2015-04-01から1ヶ月間の記事一覧

mruby-threadのwin32対応メモ

mruby-threadがpthreadのみのラッパーだったので、 c11のthreads.hを試したメモ - 会者定離で以降 上記参照のc11 threads emulation libraryを使って、win32thread/pthreadラッパーに拡張した*1。 GitHub - murasesyuka/mruby-thread 課題 windowsでのmruby…

C言語でオブジェクト指向ってこうゆうこと?

なんか世の中には、C言語でオブジェクト指向的な書き方を説明した本が有るとのこと。 ん〜、こんな感じかな?c11のthreads.hを試したメモ - 会者定離で以降のときに作った残念Stackを、オブジェクト指向っぽく書き直したの。 ちなみにStackサイズ固定なのは…

use c11 thread emulate library on Mesa 3D Graphics Library

C11

my local gcc 4.9.2 is not support to "threads.h" yet. $ make gcc -Wall -std=c11 main.c -pthread main.c:2:21: fatal error: threads.h: No such file or directory #include <threads.h> ^ compilation terminated. Makefile:5: recipe for target 'test' failed </threads.h>…

c11のthreads.hを試したメモ

c11にthreads.hがあるとtweetで知ったので試してみた記録。 で、c11/threads.hググっていたら、まだgcc/glibc等にあまり実装されていないようで win32thread/pthread等でのエミュレーションライブラリが有るようなのでためしてみる。 上記のc11のエミュレー…