1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/openwsn/patches/cross-layers_openqueue.c.patch
2014-05-14 15:06:50 +02:00

135 lines
3.4 KiB
Diff

*** stock_iot-lab_M3/openwsn/cross-layers/openqueue.c Thu Apr 24 11:01:37 2014
--- riot-openwsn-wip/openwsn/cross-layers/openqueue.c Thu Apr 24 16:55:54 2014
***************
*** 6,15 ****
//=========================== variables =======================================
- typedef struct {
- OpenQueueEntry_t queue[QUEUELENGTH];
- } openqueue_vars_t;
-
openqueue_vars_t openqueue_vars;
//=========================== prototypes ======================================
--- 6,11 ----
***************
*** 23,29 ****
/**
\brief Initialize this module.
*/
! void openqueue_init() {
uint8_t i;
for (i=0;i<QUEUELENGTH;i++){
openqueue_reset_entry(&(openqueue_vars.queue[i]));
--- 19,25 ----
/**
\brief Initialize this module.
*/
! void openqueue_init(void) {
uint8_t i;
for (i=0;i<QUEUELENGTH;i++){
openqueue_reset_entry(&(openqueue_vars.queue[i]));
***************
*** 38,44 ****
\returns TRUE if this function printed something, FALSE otherwise.
*/
! bool debugPrint_queue() {
debugOpenQueueEntry_t output[QUEUELENGTH];
uint8_t i;
for (i=0;i<QUEUELENGTH;i++) {
--- 34,40 ----
\returns TRUE if this function printed something, FALSE otherwise.
*/
! bool debugPrint_queue(void) {
debugOpenQueueEntry_t output[QUEUELENGTH];
uint8_t i;
for (i=0;i<QUEUELENGTH;i++) {
***************
*** 98,104 ****
\returns E_SUCCESS when the freeing was succeful.
\returns E_FAIL when the module could not find the specified packet buffer.
*/
! error_t openqueue_freePacketBuffer(OpenQueueEntry_t* pkt) {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
--- 94,100 ----
\returns E_SUCCESS when the freeing was succeful.
\returns E_FAIL when the module could not find the specified packet buffer.
*/
! owerror_t openqueue_freePacketBuffer(OpenQueueEntry_t* pkt) {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
***************
*** 126,132 ****
/**
\brief Free all the packet buffers created by a specific module.
! \param owner The identifier of the component, taken in COMPONENT_*.
*/
void openqueue_removeAllCreatedBy(uint8_t creator) {
uint8_t i;
--- 122,128 ----
/**
\brief Free all the packet buffers created by a specific module.
! \param creator The identifier of the component, taken in COMPONENT_*.
*/
void openqueue_removeAllCreatedBy(uint8_t creator) {
uint8_t i;
***************
*** 159,165 ****
//======= called by RES
! OpenQueueEntry_t* openqueue_resGetSentPacket() {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
--- 155,161 ----
//======= called by RES
! OpenQueueEntry_t* openqueue_resGetSentPacket(void) {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
***************
*** 174,180 ****
return NULL;
}
! OpenQueueEntry_t* openqueue_resGetReceivedPacket() {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
--- 170,176 ----
return NULL;
}
! OpenQueueEntry_t* openqueue_resGetReceivedPacket(void) {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
***************
*** 225,231 ****
return NULL;
}
! OpenQueueEntry_t* openqueue_macGetAdvPacket() {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
--- 221,227 ----
return NULL;
}
! OpenQueueEntry_t* openqueue_macGetAdvPacket(void) {
uint8_t i;
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();