theLink 10.0
Loading...
Searching...
No Matches
LibMqMsgque_cs.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "LibMqMsgque_cs.c"
12
13/* LABEL-END */
14
15#include "LibMqMsgque_cs.h"
16
18
22 MK_STRN ident,
23 MqCreateF fChildCreate,
24 MqDeleteF fChildDelete,
25 MqCreateF fParentCreate,
26 MqDeleteF fParentDelete,
27 MqExitF MqProcessExitCB,
28 MqExitF MqThreadExitCB,
29 MqWaitForPipeF MqWaitForPipeCB
30) {
31 assert(ident != NULL);
34 MqContextCT->argvFix = true;
35 MqContextCT->ignoreFork = true;
36 MqContextCT->ignoreDisasterSetup = true ;
37 MqContextCT->Child.fCreate = fChildCreate;
38 MqContextCT->Child.fDelete = fChildDelete;
39 MqContextCT->Parent.fCreate = fParentCreate;
40 MqContextCT->Parent.fDelete = fParentDelete;
41 MqContextCT->MqProcessExitCB = MqProcessExitCB;
42 MqContextCT->MqThreadExitCB = MqThreadExitCB;
43 MqContextCT->MqWaitForPipeCB = MqWaitForPipeCB;
44 return MqContextCTT;
45}
46
49 MqCsTypeLookupE const typeL,
50 MkSelfCreateF const selfCTOR,
51 MkSelfUnlinkF const selfUnlink
52) {
54 MK_TYP type = NULL;
55 switch (typeL) {
56 // BEGIN-CLS - created by 'cs_PreMeta.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
57
58 case MQ_CS_TYPE_LOOKUP_FCT : type = MqFactoryC_TT ; break;
59 case MQ_CS_TYPE_LOOKUP_CTX : type = MqContextC_TT ; break;
60 case MQ_CS_TYPE_LOOKUP_DMP : type = MqDumpC_TT ; break;
61
62 // END-CLS - created by 'cs_PreMeta.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
63 default: MkPanicC_1("get invalid type enum '%d' not part of 'MqCsTypeLookupE'");
64 }
65 assert(type != NULL);
66 type->selfCreate = selfCTOR;
67 type->selfUnlink = selfUnlink;
68}
69
70void MqCsInit (
71 MqSysServerThreadF SysServerThread,
72 MkSysExitF SysExit
73) {
74 if (SysServerThread) MqLal.MqSysServerThreadCB = SysServerThread;
75 if (SysExit) MkLal.MkSysExitCB = SysExit;
76}
77
78// vim: tabstop=8
void MqCsTypeUpdate_RT(MK_RT mkrt, MqCsTypeLookupE const typeL, MkSelfCreateF const selfCTOR, MkSelfUnlinkF const selfUnlink)
void MqCsInit(MqSysServerThreadF SysServerThread, MkSysExitF SysExit)
MK_PTR MqCsContextTypeCreate_RT(MK_RT mkrt, MK_STRN ident, MqCreateF fChildCreate, MqDeleteF fChildDelete, MqCreateF fParentCreate, MqDeleteF fParentDelete, MqExitF MqProcessExitCB, MqExitF MqThreadExitCB, MqWaitForPipeF MqWaitForPipeCB)
#define MqRtSetup_NULL_RT
#define MkPanicC_1(message)
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
void(* MkSelfUnlinkF)(MK_RT mkrt, MK_PTR self, MK_PTR const env)
MK_PTR(* MkSelfCreateF)(MK_RT mkrt, MK_OBJ const obj, MK_PTR const env)
struct MkLalS MkLal
int(* MkSysExitF)(MK_RT mkrt, int isThread, int num)
#define MK_RT_ARGS
#define MkTypeDup2(...)
#define MqContextCTT
class as MkTypeS-class-type for MqContextC in the Target-Programming-Language (TPL) …
#define MqContextCT
class as MqTypeCtxS-class-type for MqContextC in the Target-Programming-Language (TPL) …
#define MqContextC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
int(* MqExitF)(MK_RT mkrt, int num)
prototype for exit a process or thread …
bool(* MqWaitForPipeF)(MK_RT mkrt, MQ_CTX const ctx, const struct MkIdS *idP)
Wait for a pipe-server to finish …
void(* MqDeleteF)(MQ_CTX const ctx)
the prototype for a ContextDelete function …
enum MkErrorE(* MqCreateF)(MK_RT mkrt, MQ_CTX const ctx, MK_BFL const args)
the prototype for the ContextCreate function …
#define MqDumpC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MqFactoryC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
struct MqLalS MqLal
Language Abstraction Layer in duty.
enum MkErrorE(* MqSysServerThreadF)(MK_RT mkrt, MQ_CTX const ctx, struct MqSysServerThreadMainS *const argP, MK_STRN name, int state, struct MkIdS *idPtrOut)
thread server create syscall with csmqmsgque error plugin
bool MqRuntimeThreadPoolUse
MkSysExitF MkSysExitCB
MkSelfUnlinkF selfUnlink
MkSelfCreateF selfCreate
MqSysServerThreadF MqSysServerThreadCB
thread server create syscall with csmqmsgque error plugin