2 * transsip - the telephony toolkit
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011, 2012 Daniel Borkmann <dborkma@tik.ee.ethz.ch>
5 * Subject to the GPL, version 2.
14 extern void enter_shell_loop(int tsocki
, int tsocko
);
15 extern void *engine_main(void *arg
);
18 static struct pipepair pp
;
20 static void start_server(int usocki
, int usocko
)
24 int ret
= pthread_create(&tid
, NULL
, engine_main
, &pp
);
26 panic("Cannot create server thread!\n");
29 static void stop_server(void)
31 pthread_join(tid
, NULL
);
38 struct sched_param param
;
42 panic("Cannot create event fd!\n");
45 panic("Cannot create event fd!\n");
47 param
.sched_priority
= sched_get_priority_min(SCHED_FIFO
);
48 sched_setscheduler(0, SCHED_FIFO
, ¶m
);
50 start_server(efd
[0], refd
[1]);
51 enter_shell_loop(refd
[0], efd
[1]);