From fdfcb2a8f953cc91abbe628366e3f5474a101670 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 14 Mar 2008 11:04:36 +0000 Subject: added advanced flow control for congestion cases (mode depending on message source and its capablity to be delayed without bad side effects) --- msg.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'msg.c') diff --git a/msg.c b/msg.c index f99fd853..d4291a66 100644 --- a/msg.c +++ b/msg.c @@ -904,6 +904,25 @@ char *getFacilityStr(msg_t *pM) } +/* set flow control state (if not called, the default - NO_DELAY - is used) + * This needs no locking because it is only done while the object is + * not fully constructed (which also means you must not call this + * method after the msg has been handed over to a queue). + * rgerhards, 2008-03-14 + */ +rsRetVal +MsgSetFlowControlType(msg_t *pMsg, flowControl_t eFlowCtl) +{ + DEFiRet; + assert(pMsg != NULL); + assert(eFlowCtl == eFLOWCTL_NO_DELAY || eFlowCtl == eFLOWCTL_LIGHT_DELAY || eFlowCtl == eFLOWCTL_FULL_DELAY); + + pMsg->flowCtlType = eFlowCtl; + + RETiRet; +} + + /* rgerhards 2004-11-24: set APP-NAME in msg object * TODO: revisit msg locking code! */ -- cgit