#include "rcs_defs.hh"Include dependency graph for rcs_exit.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| int RCS_EXPORT | attach_rcs_exit_list (void(*fptr)(int)) |
| void RCS_EXPORT | rcs_cleanup (int code) |
| void RCS_EXPORT | rcs_exit (int code) |
|
|
Definition at line 56 of file rcs_exit.cc. 00058 {
00059 RCS_EXIT_LIST_ENTRY entry;
00060 if (NULL == exit_list)
00061 {
00062 exit_list = new RCS_LINKED_LIST;
00063 }
00064 if (NULL == exit_list)
00065 {
00066 rcs_print_error ("attach_rcs_exit_list:: Out of Memory.\n");
00067 return -1;
00068 }
00069 entry.process_id = 0;
00070 entry.fptr = fptr;
00071 #ifdef WINDOWS
00072 entry.process_id = ((long) GetCurrentProcessId ());
00073 #endif
00074 #ifdef VXWORKS
00075 entry.process_id = (long) taskIdSelf ();
00076 #endif
00077 return exit_list->store_at_tail (&entry, sizeof (entry), 1);
00078 }
|
|
|
Definition at line 81 of file rcs_exit.cc. Referenced by rcs_exit().
00082 {
00083 RCS_EXIT_LIST_ENTRY *entry;
00084 long process_id = 0;
00085 #ifdef WINDOWS
00086 process_id = ((long) GetCurrentProcessId ());
00087 #endif
00088 #ifdef VXWORKS
00089 process_id = (long) taskIdSelf ();
00090 #endif
00091
00092 if (NULL == exit_list)
00093 {
00094 return;
00095 }
00096 entry = (RCS_EXIT_LIST_ENTRY *) exit_list->get_head ();
00097 while (NULL != entry)
00098 {
00099 if (entry->process_id == process_id && entry->fptr != NULL)
00100 {
00101 entry->fptr (code);
00102 }
00103 entry = (RCS_EXIT_LIST_ENTRY *) exit_list->get_next ();
00104 }
00105 if (exit_list->list_size == 0)
00106 {
00107 delete exit_list;
00108 exit_list = (RCS_LINKED_LIST *) NULL;
00109 }
00110 }
|
|
|
Definition at line 122 of file rcs_exit.cc. Referenced by NML_MODULE::addSubordinate(), main(), run_nml_server_exit(), NML_MODULE::setCmdChannel(), NML_MODULE::setErrorLogChannel(), NML_MODULE::setStatChannel(), and NML_MODULE::use_realloc().
00123 {
00124 rcs_cleanup (code);
00125 #ifdef UNDER_CE
00126 ExitThread (code);
00127 #else
00128 #ifndef VXWORKS
00129 if (code == -1)
00130 {
00131 rcs_print_error ("\n Errors Reported!!!\n Press ^C to exit.\n");
00132 signal (SIGINT, rcs_exit_signal_handler);
00133 int secs = 0;
00134 while (!rcs_ready_for_exit && secs < 600)
00135 {
00136 esleep (1.0);
00137 secs++;
00138 }
00139 }
00140 #endif
00141 exit (code);
00142 #endif
00143 }
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001