#include "stdio.h"
#include "stdlib.h"
#include "task.h"
#include "MessageQueue.h"
Go to the source code of this file.
Functions | |
MESSAGE_QUEUE * | MqInit (int size, char *name) |
void | MqPut (MESSAGE_QUEUE *mq, MSG *m) |
MSG * | MqGet (MESSAGE_QUEUE *mq) |
MSG * | NewMSG (int payloadSize) |
void | DeleteMSG (MSG *m) |
void | InitMessageQueueManager (void) |
Variables | |
static ECB * | MqBlocker |
int | MsgAllocCount = 0 |
void DeleteMSG | ( | MSG * | m | ) |
void InitMessageQueueManager | ( | void | ) |
Definition at line 89 of file MessageQueue.c.
References NewSemaphore(), and SEMAPHORE_MODE_BLOCKING.
MSG* MqGet | ( | MESSAGE_QUEUE * | mq | ) |
Definition at line 50 of file MessageQueue.c.
References _msgqueue::b, Disable(), Enable(), _msgqueue::nMsg, PendSemaphore(), _msgqueue::Sem, _msgqueue::Size, and _msgqueue::Tail.
Referenced by MMCTask().
MESSAGE_QUEUE* MqInit | ( | int | size, | |
char * | name | |||
) |
Definition at line 15 of file MessageQueue.c.
References _msgqueue::b, _msgqueue::Head, malloc, NewSemaphore(), _msgqueue::nMsg, PendSemaphore(), PostSemaphore(), _msgqueue::Sem, SEMAPHORE_MODE_BLOCKING, _msgqueue::Size, and _msgqueue::Tail.
Referenced by mmcInit().
void MqPut | ( | MESSAGE_QUEUE * | mq, | |
MSG * | m | |||
) |
Definition at line 31 of file MessageQueue.c.
References _msgqueue::b, Disable(), Enable(), _msgqueue::Head, _msgqueue::nMsg, PostSemaphore(), _msgqueue::Sem, and _msgqueue::Size.
Referenced by MsgMMCReadSector(), MsgMMCReset(), MsgMMCSendStatus(), MsgMMCWriteSector(), and MsgMMCWriteTestFile().
MSG* NewMSG | ( | int | payloadSize | ) |
Definition at line 68 of file MessageQueue.c.
References malloc, _msg::MaxPayload, MsgAllocCount, _msg::next, _msg::PayloadSize, and _msg::ReplyHandle.
Referenced by MsgMMCReadSector(), MsgMMCReset(), MsgMMCSendStatus(), MsgMMCWriteSector(), and MsgMMCWriteTestFile().
Definition at line 12 of file MessageQueue.c.
int MsgAllocCount = 0 |