IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16888


Ignore:
Timestamp:
Mar 8, 2008, 11:26:00 AM (18 years ago)
Author:
eugene
Message:

add comments re thread safety

Location:
trunk/Ohana/src/opihi/lib.shell
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/CommandOps.c

    r16439 r16888  
    11# include "opihi.h"
     2
     3// the command table is only modified by macro_create: if thread protection is needed, it
     4// should be added there.  it may not be needed if programs only call macro_create in a
     5// single thread.  pantasks_server only calls macro_create in the 'input' thread, so it is
     6// safe.
    27
    38// if the user has installed the libedit version of readline, we need to modify a couple symbols:
  • trunk/Ohana/src/opihi/lib.shell/ConfigInit.c

    r16440 r16888  
    33static char *GlobalConfig;
    44
     5// this function is only called at start, so it is not thread protect
    56int ConfigInit (int *argc, char **argv) {
    67
     
    1920  free (file);
    2021  return (TRUE);
     22}
     23
     24// this function is only called at shutdown, so it is not thread protect
     25void ConfigFree () {
     26  if (GlobalConfig) free (GlobalConfig);
     27  return;
    2128}
    2229
     
    6572}
    6673
    67 void ConfigFree () {
    68   if (GlobalConfig) free (GlobalConfig);
    69   return;
    70 }
  • trunk/Ohana/src/opihi/lib.shell/MacroOps.c

    r16442 r16888  
    11# include "opihi.h"
     2
     3// the macro table is only modified by macro_create: if thread protection is needed, it
     4// should be added there.  it may not be needed if programs only call macro_create in a
     5// single thread.  pantasks_server only calls macro_create in the 'input' thread, so it is
     6// safe.
    27
    38static char dot[] = ".";
Note: See TracChangeset for help on using the changeset viewer.