// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root // SPDX-License-Identifier: LGPL-2.1-or-later /****************************************************************************/ /* */ /* File: join.h */ /* */ /* Purpose: header file for join environment */ /* */ /* Author: Klaus Birken */ /* Institut fuer Computeranwendungen III */ /* Universitaet Stuttgart */ /* Pfaffenwaldring 27 */ /* 70569 Stuttgart */ /* email: birken@ica3.uni-stuttgart.de */ /* phone: 0049-(0)711-685-7007 */ /* fax : 0049-(0)711-685-7000 */ /* */ /* History: 980126 kb begin */ /* */ /* Remarks: */ /* */ /****************************************************************************/ /****************************************************************************/ /* */ /* auto include mechanism and other include files */ /* */ /****************************************************************************/ #ifndef __JOIN_H__ #define __JOIN_H__ #include #define DebugJoin 10 /* 0 is all, 10 is off */ #include #include /* for object-orientated style via preprocessor */ /****************************************************************************/ /* */ /* defines in the following order */ /* */ /* compile time constants defining static data size (i.e. arrays) */ /* other constants */ /* macros */ /* */ /****************************************************************************/ /* some macros for customizing oopp */ #define _NEWPARAMS #define _NEWPARAMS_OR_VOID void #define __INDENT(n) { int i; for(i=0; i /****************************************************************************/ /* JIPartner: description of phase1 message on sender side */ /****************************************************************************/ struct JIPartner { DDD_HDR hdr; /* local obj which has been contacted by join */ DDD_PROC proc; /* proc which initiated join */ }; /****************************************************************************/ /* JIAddCpl: remote command to add cpl for join-obj during phase 2 */ /****************************************************************************/ struct TEAddCpl { DDD_GID gid; /* gid of object to add coupling */ DDD_PROC proc; /* proc of new coupling */ DDD_PRIO prio; /* prio of new coupling */ }; #define ClassName JIAddCpl Class_Data_Begin DDD_PROC dest; /* receiver of this item */ TEAddCpl te; /* table entry (for message) */ Class_Data_End void Method(Print) (DefThis _PRINTPARAMS); int Method(Compare) (ClassPtr, ClassPtr, const DDD::DDDContext*); #undef ClassName /* define container class */ #ifndef SetOf /* necessary for inline documentation only */ #define SetOf JIAddCpl #define Set_SegmSize 256 #define Set_BTreeOrder 32 #endif #include /****************************************************************************/ /* JOINMSG1: description of phase1 message on sender side */ /****************************************************************************/ struct TEJoin { DDD_GID gid; /* gid of distributed obj to join with */ DDD_PRIO prio; /* prio of new local object which is joined */ DDD_HDR hdr; /* hdr of local DDD object (only for receiver) */ }; struct JOINMSG1 { DDD_PROC dest; /* receiver of message */ JOINMSG1 *next; JIJoinPtr *arrayJoin; int nJoins; /* lowcomm message handle */ LC_MSGHANDLE msg_h; }; /****************************************************************************/ /* JOINMSG2: description of phase2 message on sender side */ /****************************************************************************/ struct JOINMSG2 { DDD_PROC dest; /* receiver of message */ JOINMSG2 *next; JIAddCplPtr *arrayAddCpl; int nAddCpls; /* lowcomm message handle */ LC_MSGHANDLE msg_h; }; /****************************************************************************/ /* JOINMSG3: description of phase3 message on sender side */ /****************************************************************************/ struct JOINMSG3 { DDD_PROC dest; /* receiver of message */ JOINMSG3 *next; JIAddCplPtr *arrayAddCpl; int nAddCpls; /* lowcomm message handle */ LC_MSGHANDLE msg_h; }; /****************************************************************************/ /* */ /* function declarations */ /* */ /****************************************************************************/ /* join.c, used only by cmds.c */ /* XICopyObj **CplClosureEstimate(DDD::DDDContext& context, XICopyObjPtrArray *, int *); int PrepareObjMsgs(XICopyObjPtrArray *, XINewCpl **, int, XIOldCpl **, int, XFERMSG **, size_t *); void ExecLocalXIDelCmd(XIDelCmd **, int); void ExecLocalXISetPrio(XISetPrioPtrArray *, XIDelObj **,int, XICopyObj **,int); void ExecLocalXIDelObj(XIDelObj **, int, XICopyObj **,int); void PropagateCplInfos(XISetPrio **, int, XIDelObj **, int, TENewCpl *, int); */ bool JoinStepMode(DDD::DDDContext& context, JoinMode); /* pack.c, used only by cmds.c */ /* void XferPackMsgs (XFERMSG *); */ /* unpack.c, used only by cmds.c */ /* void XferUnpack (LC_MSGHANDLE *, int, DDD_HDR *, int, XISetPrioPtrArray *, XIDelObj **, int, XICopyObjPtrArray *, XICopyObj **, int); */ /* ctrl.c */ /* void XferDisplayMsg (DDD::DDDContext& context, char *comment, LC_MSGHANDLE); */ END_UGDIM_NAMESPACE #endif