Subversion Repositories shark

Rev

Rev 490 | Rev 513 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#include <kernel/int_sem.h>
#include <stdlib.h>
#include <kernel/func.h>
#include <ll/sys/ll/event.h>

void shark_internal_sem_create(void **sem, int init) {
        *sem = (void *)malloc(sizeof(internal_sem_t));
        internal_sem_init((internal_sem_t *)(*sem),init);
}

void shark_internal_sem_wait(void *sem) {
        internal_sem_wait((internal_sem_t *)(sem));
}

void shark_internal_sem_post(void *sem) {
 internal_sem_post((internal_sem_t *)(sem));
}

int shark_event_post(const struct timespec *time, void (*handler)(void *p), void *par)
{
        return event_post(*time, handler, par);
}

int shark_event_delete(int index)
{
        return event_delete(index);
}

int shark_handler_set(int no, void (*fast)(int), int pi, BYTE lock){
        return handler_set(no, fast, (PID)pi, lock);
}

int shark_handler_remove(int no){
        return handler_remove(no);
}