예제 #1
0
 Acid64 ()
 :Event("ACID64 First SID Access")
 ,me(_self())
 ,builder("ACID64", *_self())
 ,tune(0)
 { 
     ;
 }
예제 #2
0
파일: lworker.c 프로젝트: apppur/lworker
static void* _thread(void *arg){
    lua_State *L = (lua_State *)arg;
    luaL_openlibs(L);
    luaL_requiref(L, "lwork", luaopen_lworker, 1);
    lua_pop(L, 1);
    if(lua_pcall(L, 0, 0, 0) != 0)
        fprintf(stderr, "thread error:%s", lua_tostring(L, -1));
    printf("END PCALL\n");

    pthread_cond_destroy(&_self(L)->cond);
    lua_close(L);

    return NULL;
}
예제 #3
0
파일: lworker.c 프로젝트: apppur/lworker
static void _wait(lua_State *L, const char *channel, worker **queue) {
    worker *p = _self(L);

    if (*queue == NULL) {
        *queue = p;
        p->prev = p->next = p;
    } else {
        p->prev = (*queue)->prev;
        p->next = *queue;
        p->prev->next = p->next->prev = p;
    }
    p->channel = channel;

    do{
        pthread_cond_wait(&p->cond, &mutex);
    } while(p->channel);
}