Subversion Repositories shark

Rev

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

Rev Author Line No. Line
490 giacomo 1
#include <kernel/int_sem.h>
2
#include <stdlib.h>
496 giacomo 3
#include <kernel/func.h>
4
#include <ll/sys/ll/event.h>
490 giacomo 5
 
6
void shark_internal_sem_create(void **sem, int init) {
496 giacomo 7
        *sem = (void *)malloc(sizeof(internal_sem_t));
8
        internal_sem_init((internal_sem_t *)(*sem),init);
490 giacomo 9
}
10
 
11
void shark_internal_sem_wait(void *sem) {
496 giacomo 12
        internal_sem_wait((internal_sem_t *)(sem));
13
}
490 giacomo 14
 
496 giacomo 15
void shark_internal_sem_post(void *sem) {
16
 internal_sem_post((internal_sem_t *)(sem));
17
}
490 giacomo 18
 
496 giacomo 19
int shark_event_post(const struct timespec *time, void (*handler)(void *p), void *par)
20
{
21
        return event_post(*time, handler, par);
490 giacomo 22
}
23
 
496 giacomo 24
int shark_event_delete(int index)
25
{
26
        return event_delete(index);
27
}
490 giacomo 28
 
496 giacomo 29
int shark_handler_set(int no, void (*fast)(int), int pi, BYTE lock){
30
        return handler_set(no, fast, (PID)pi, lock);
31
}
490 giacomo 32
 
496 giacomo 33
int shark_handler_remove(int no){
34
        return handler_remove(no);
490 giacomo 35
}
496 giacomo 36