Changeset 7960 for trunk/Ohana/src/opihi/pantasks
- Timestamp:
- Jul 24, 2006, 3:15:49 PM (20 years ago)
- Location:
- trunk/Ohana/src/opihi/pantasks
- Files:
-
- 2 added
- 6 edited
-
Makefile (modified) (2 diffs)
-
init.c (modified) (2 diffs)
-
init_server.c (added)
-
pantasks.c (modified) (2 diffs)
-
server_threads.c (modified) (4 diffs)
-
status.c (modified) (1 diff)
-
status_server.c (added)
-
task.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/Makefile
r7952 r7960 48 48 $(SDIR)/kill.$(ARCH).o \ 49 49 $(SDIR)/delete.$(ARCH).o \ 50 $(SDIR)/server.$(ARCH).o \51 50 $(SDIR)/verbose.$(ARCH).o \ 52 51 $(SDIR)/controller.$(ARCH).o \ … … 79 78 $(SDIR)/InputQueue.$(ARCH).o \ 80 79 $(SDIR)/ListenClients.$(ARCH).o \ 80 $(SDIR)/server.$(ARCH).o \ 81 $(SDIR)/status_server.$(ARCH).o \ 82 $(SDIR)/init_server.$(ARCH).o \ 81 83 $(SDIR)/CheckPassword.$(ARCH).o 82 84 -
trunk/Ohana/src/opihi/pantasks/init.c
r7929 r7960 38 38 }; 39 39 40 /* these are functions which duplicate actions on the41 controller. these could simply pass the command along42 to the controller (and should then be in 'controller'),43 or they could add / modify the jobs in the scheduler44 job stack45 46 {"job", job, "add job"},47 {"kill", kill_sh, "kill job"},48 {"delete", delete, "delete job"},49 {"stdout", stdout_sh, "get stdout buffer for job"},50 {"stderr", stderr_sh, "get stderr buffer for job"},51 */52 53 40 void InitPantasks () { 54 41 … … 62 49 AddCommand (&cmds[i]); 63 50 } 64 65 51 } 66 67 int server PROTO((int, char **));68 69 static Command server_cmds[] = {70 {"server", server, "server-specific commands"},71 };72 73 void InitPantasksServer () {74 75 int i;76 77 InitTasks ();78 InitJobs ();79 InitJobIDs ();80 81 for (i = 0; i < sizeof (cmds) / sizeof (Command); i++) {82 AddCommand (&cmds[i]);83 }84 for (i = 0; i < sizeof (server_cmds) / sizeof (Command); i++) {85 AddCommand (&server_cmds[i]);86 }87 88 } -
trunk/Ohana/src/opihi/pantasks/pantasks.c
r7917 r7960 16 16 InitData (); 17 17 InitPantasks (); 18 19 gprintInit (); 18 20 19 21 rl_readline_name = opihi_name; … … 54 56 return; 55 57 } 58 59 /* call to opihi shell */ 60 int main (int argc, char **argv) { 61 int status; 62 status = opihi (argc, argv); 63 exit (status); 64 } -
trunk/Ohana/src/opihi/pantasks/server_threads.c
r7952 r7960 24 24 } 25 25 26 void CheckTasksThread ( ) {26 void CheckTasksThread (void *data) { 27 27 28 28 gprintInit (); // each thread needs to init the printing system … … 55 55 } 56 56 57 void CheckJobsThread ( ) {57 void CheckJobsThread (void *data) { 58 58 59 59 gprintInit (); // each thread needs to init the printing system … … 86 86 } 87 87 88 void CheckControllerThread ( ) {88 void CheckControllerThread (void *data) { 89 89 90 90 gprintInit (); // each thread needs to init the printing system … … 118 118 } 119 119 120 void CheckInputsThread ( ) {120 void CheckInputsThread (void *data) { 121 121 122 122 gprintInit (); // each thread needs to init the printing system -
trunk/Ohana/src/opihi/pantasks/status.c
r7952 r7960 14 14 gprint (GP_LOG, " Controller is stopped\n"); 15 15 } 16 if (CheckTasksGetState()) {17 gprint (GP_LOG, " Scheduler is running\n");18 } else {19 gprint (GP_LOG, " Scheduler is stopped\n");20 }21 if (CheckControllerGetState()) {22 gprint (GP_LOG, " Controller is running\n");23 } else {24 gprint (GP_LOG, " Controller is stopped\n");25 }26 16 ListTasks (FALSE); 27 17 ListJobs (); 28 18 return (TRUE); 29 19 } 30 -
trunk/Ohana/src/opihi/pantasks/task.c
r7917 r7960 96 96 case TASK_COMMAND: 97 97 case TASK_PERIODS: 98 status = command (input, &outline );98 status = command (input, &outline, TRUE); 99 99 if (outline != NULL) free (outline); 100 100 /* what to do if command is invalid?
Note:
See TracChangeset
for help on using the changeset viewer.
