Exemplo n.º 1
0
struct lsQueueEntry *
lsQueueDequeue_(struct lsQueue *head)
{
    struct lsQueueEntry *entry, *start;
    if (! head)
        return (struct lsQueueEntry *)NULL;

    if (! LS_QUEUE_EMPTY(head)) {
	start = head->start;
	entry = start->forw;
	lsQueueEntryRemove_(entry);
	return(entry);
    } else 
	return (struct lsQueueEntry *)NULL;

}     
Exemplo n.º 2
0
int
lsMsgRdy_(int taskid, int *msgLen)
{
    struct tid *tEnt;
    struct lsQueueEntry *qEnt;
    struct lsTMsgHdr *header;

    tEnt = tidFindIgnoreConn_(taskid);
    if (tEnt == NULL)
        return -1;

    if (! LS_QUEUE_EMPTY(tEnt->tMsgQ)) {
	qEnt = tEnt->tMsgQ->start->forw;
	header = (struct lsTMsgHdr *)qEnt->data;
	if (msgLen != NULL)
	    *msgLen = header->len;
	return (1);
    } else
        return 0;

}