2 * transsip - the telephony toolkit
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011, 2012 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 * Swiss federal institute of technology (ETH Zurich)
6 * Subject to the GPL, version 2.
15 extern void enter_shell_loop(int tsocki
, int tsocko
);
16 extern void *engine_main(void *arg
);
19 static struct pipepair pp
;
21 static void start_server(int usocki
, int usocko
)
25 int ret
= pthread_create(&tid
, NULL
, engine_main
, &pp
);
27 panic("Cannot create server thread!\n");
30 static void stop_server(void)
32 pthread_join(tid
, NULL
);
39 struct sched_param param
;
43 panic("Cannot create event fd!\n");
46 panic("Cannot create event fd!\n");
48 param
.sched_priority
= sched_get_priority_min(SCHED_FIFO
);
49 sched_setscheduler(0, SCHED_FIFO
, ¶m
);
51 start_server(efd
[0], refd
[1]);
52 enter_shell_loop(refd
[0], efd
[1]);