Added callbackSetQueueSize

This commit is contained in:
Marty Kraimer
1996-05-03 14:09:27 +00:00
parent a6d0a677ee
commit 14d712b57c
2 changed files with 10 additions and 2 deletions
+8 -2
View File
@@ -51,7 +51,7 @@
#include <dbLock.h>
#include <task_params.h>
#define QUEUESIZE 1000
int callbackQueueSize = 2000;
static SEM_ID callbackSem[NUM_CALLBACK_PRIORITIES];
static RING_ID callbackQ[NUM_CALLBACK_PRIORITIES];
static int callbackTaskId[NUM_CALLBACK_PRIORITIES];
@@ -63,6 +63,12 @@ static void wdCallback(long ind); /*callback from taskwd*/
static void start(int ind); /*start or restart a callbackTask*/
/*public routines */
int callbackSetQueueSize(int size)
{
callbackQueueSize = size;
return(0);
}
long callbackInit()
{
int i;
@@ -145,7 +151,7 @@ static void start(int ind)
errMessage(0,"semBcreate failed while starting a callback task\n");
return;
}
if((callbackQ[ind] = rngCreate(sizeof(CALLBACK *) * QUEUESIZE)) == NULL)
if((callbackQ[ind]=rngCreate(sizeof(CALLBACK *)*callbackQueueSize)) == NULL)
errMessage(0,"rngCreate failed while starting a callback task");
sprintf(taskName,"cb%s",priorityName[ind]);
callbackTaskId[ind] = taskSpawn(taskName,priority,
+2
View File
@@ -76,10 +76,12 @@ long callbackInit();
void callbackRequest(CALLBACK *);
void callbackRequestProcessCallback(CALLBACK *pCallback,
int Priority, void *pRec);
int callbackSetQueueSize(int size);
#else
long callbackInit();
void callbackRequest();
void callbackRequestProcessCallback();
int callbackSetQueueSize();
#endif /*__STDC__*/