Changeset 11084 for trunk/Ohana/src/opihi/pantasks/pantasks.c
- Timestamp:
- Jan 12, 2007, 4:26:31 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pantasks/pantasks.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/pantasks.c
r9473 r11084 10 10 void program_init (int *argc, char **argv) { 11 11 12 pthread_t jobsThread; 13 pthread_t tasksThread; 14 pthread_t controllerThread; 15 12 16 auto_break = TRUE; 13 17 … … 26 30 set_str_variable ("RCFILE", opihi_rcfile); 27 31 28 # ifdef HELPDIR_DEFAULT 29 set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT)); 32 # ifdef DATADIR_DEFAULT 33 { 34 char *datadir; 35 char *helpdir; 36 char *modules; 37 datadir = MACRO_NAME(DATADIR_DEFAULT); 38 /* set_str_variable ("DATADIR", datadir); */ 39 ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2); 40 sprintf (helpdir, "%s/help", datadir); 41 set_str_variable ("HELPDIR", helpdir); 42 free (helpdir); 43 ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2); 44 sprintf (modules, "%s/modules", datadir); 45 set_str_variable ("MODULES:0", modules); 46 set_int_variable ("MODULES:n", 1); 47 free (helpdir); 48 } 30 49 # endif 31 50 … … 33 52 signal (SIGTSTP, gotsignal); 34 53 signal (SIGTTIN, gotsignal); 54 55 /* start up the background threads here */ 56 pthread_create (&tasksThread, NULL, &CheckTasksThread, NULL); 57 pthread_create (&jobsThread, NULL, &CheckJobsThread, NULL); 58 pthread_create (&controllerThread, NULL, &CheckControllerThread, NULL); 35 59 return; 36 60 } … … 61 85 exit (status); 62 86 } 87 88 /* pantasks runs three (or four) threads: 89 - one thread parses commands from the connected clients 90 - one thread runs the scheduler loop 91 - one thread may run the controller loop independently 92 - the main thread runs readline and accepts user input 93 */
Note:
See TracChangeset
for help on using the changeset viewer.
