Choco OS  V.0.16.9.0
Join to the chocolate world
oc_program.h
Go to the documentation of this file.
1 
28 #ifndef INC_KERNEL_OC_PROGRAM_H_
29 #define INC_KERNEL_OC_PROGRAM_H_
30 
31 #include <stdbool.h>
32 #include <oc_process.h>
33 
39 #define _________________________________________TYPES_SECTION______________________________________________________________________________
40 
43 typedef enum
44 {
45  oC_Program_Priority_IdleProgram = oC_Process_Priority_IdleProcess ,
46  oC_Program_Priority_UserSpaceProgram = oC_Process_Priority_UserSpaceProcess ,
47  oC_Program_Priority_UserSpaceDaemon = oC_Process_Priority_UserSpaceDaemon ,
48  oC_Program_Priority_CoreSpaceProgram = oC_Process_Priority_CoreSpaceProcess ,
49  oC_Program_Priority_CoreSpaceDaemon = oC_Process_Priority_CoreSpaceDaemon ,
50  oC_Program_Priority_SystemHelperProgram = oC_Process_Priority_SystemHelperProcess ,
51  oC_Program_Priority_SystemHelperDeamon = oC_Process_Priority_SystemHelperDeamon ,
52  oC_Program_Priority_SystemHandlerProgram = oC_Process_Priority_SystemHandlerProcess ,
53  oC_Program_Priority_SystemHandlerDeamon = oC_Process_Priority_SystemHandlerDeamon ,
54  oC_Program_Priority_SystemSecurityProgram = oC_Process_Priority_SystemSecurityProcess ,
55  oC_Program_Priority_SystemSecurityDeamon = oC_Process_Priority_SystemSecurityDeamon
56 } oC_Program_Priority_t;
57 
58 typedef int (*oC_Program_MainFunction_t)( int Argc , const char ** Argv );
59 
60 typedef struct
61 {
62  oC_Program_Priority_t Priority;
63  char * Name;
64  oC_Program_MainFunction_t MainFunction;
65  char * StdInName;
66  char * StdOutName;
67  char * StdErrName;
68  oC_UInt_t HeapMapSize;
69  oC_Int_t ThreadStackSize;
70  oC_MemorySize_t AllocationLimit;
71  bool TrackAllocations;
73 
75 
76 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
77 
84 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
85 
88 extern oC_Process_t oC_Program_NewProcess ( oC_Program_t Program , oC_User_t User );
89 extern oC_Program_t oC_Program_New ( oC_Program_Priority_t Priority , char * Name , oC_Program_MainFunction_t MainFunction , char * StdInName , char * StdOutName , char * StdErrName , oC_UInt_t HeapMapSize );
90 extern bool oC_Program_Delete ( oC_Program_Registration_t ** Program );
91 extern bool oC_Program_IsCorrect ( oC_Program_t Program );
92 extern oC_ErrorCode_t oC_Program_Exec ( oC_Program_t Program , oC_Process_t Process , int Argc , const char ** Argv , oC_Thread_t * outMainThread );
93 extern const char * oC_Program_GetName ( oC_Program_t Program );
94 extern const char * oC_Program_GetStdInName ( oC_Program_t Program );
95 extern const char * oC_Program_GetStdOutName ( oC_Program_t Program );
96 extern const char * oC_Program_GetStdErrName ( oC_Program_t Program );
97 extern oC_Program_Priority_t oC_Program_GetPriority ( oC_Program_t Program );
98 
99 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
100 
102 #endif /* INC_KERNEL_OC_PROGRAM_H_ */
Definition: oc_user.c:43
The file with interface for process mechanism.