Exemplo n.º 1
0
void fdevent_loop() {
    fdevent *fde;
    fdevent_subproc_setup();

    for(;;) {
        D("--- ---- waiting for events\n");

        fdevent_process();

        while((fde = fdevent_plist_dequeue())) {
            fdevent_call_fdfunc(fde);
        }
    }
}
Exemplo n.º 2
0
void fdevent_loop()
{
#if !ADB_HOST
    fdevent_subproc_setup();
#endif // !ADB_HOST

    while (true) {
        D("--- --- waiting for events");

        fdevent_process();

        while (!g_pending_list.empty()) {
            fdevent* fde = g_pending_list.front();
            g_pending_list.pop_front();
            fdevent_call_fdfunc(fde);
        }
    }
}
Exemplo n.º 3
0
Arquivo: fdevent.c Projeto: phybio/adb
void fdevent_loop()
{
    printf("function = %s, file = %s, line = %u \n", __FUNCTION__, __FILE__, __LINE__);
    fdevent *fde;
    fdevent_subproc_setup();

    for(;;) {
        D("--- ---- waiting for events\n");
        printf("function = %s, file = %s, line = %u, before fdevent_process \n", __FUNCTION__, __FILE__, __LINE__);

        fdevent_process();
        printf("function = %s, file = %s, line = %u, after fdevent_process \n", __FUNCTION__, __FILE__, __LINE__);

        while((fde = fdevent_plist_dequeue())) {
            fdevent_call_fdfunc(fde);
        }
    }
}
void fdevent_loop()
{
    fdevent *fde;

    for(;;) {
#if DEBUG
        fprintf(stderr,"--- ---- waiting for events\n");
#endif
        fdevent_process();

        while((fde = fdevent_plist_dequeue())) {
            unsigned events = fde->events;
            fde->events = 0;
            fde->state &= (~FDE_PENDING);
            dump_fde(fde, "callback");
            fde->func(fde->fd, events, fde->arg);
        }
    }
}