Project

General

Profile

« Previous | Next » 

Revision 39736270

Added by Hamish Coleman over 13 years ago

  • ID 39736270c860147751b68999fd4645ae1717815d

Pass the args to the main function and thus allow the init function to be optional.

View differences:

svctest.c
dprintf(1,"%s:%i(%s) %s\n",__FILE__,__LINE__,__FUNCTION__,s)
int svctest_init(int argc, char **argv);
int svctest_main(int param1);
int svctest_stop(int param1);
int svctest_main(int argc, char **argv);
int svctest_stop(void *);
struct SCM_def sd = {
.name = "svctest",
......
}
int run = 1;
int svctest_main(int param1) {
int svctest_main(int argc, char **argv) {
while(run) {
1;
/* FIXME - sleep */
......
return 0;
}
int svctest_stop(int param1) {
int svctest_stop(void *param1) {
run = 0;
trace("return 0");
return 0;

Also available in: Unified diff