index 438e1af4f4cc007e4d91d8b1ad2a837be37a3daf..b1bccc366f57112934c9e5d7188f57c32687d6bb 100644 (file)
#include <ti/sysbios/hal/Hwi.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/hal/Hwi.h>
#include <ti/sysbios/knl/Clock.h>
-#include <ti/sysbios/gates/GateAll.h>
+#include <ti/sysbios/gates/GateHwi.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/hal/Cache.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/hal/Cache.h>
UInt16 procId;
/* Gate to protect from multiple threads */
UInt16 procId;
/* Gate to protect from multiple threads */
- GateAll_Handle gateH;
+ GateHwi_Handle gateH;
} VirtQueue_Object;
static struct VirtQueue_Object *queueRegistry[NUM_QUEUES] = {NULL};
} VirtQueue_Object;
static struct VirtQueue_Object *queueRegistry[NUM_QUEUES] = {NULL};
struct vring_used_elem *used;
IArg key;
struct vring_used_elem *used;
IArg key;
- key = GateAll_enter(vq->gateH);
+ key = GateHwi_enter(vq->gateH);
if ((head > vq->vring.num) || (head < 0)) {
if ((head > vq->vring.num) || (head < 0)) {
- GateAll_leave(vq->gateH, key);
+ GateHwi_leave(vq->gateH, key);
Error_raise(NULL, Error_E_generic, 0, 0);
}
Error_raise(NULL, Error_E_generic, 0, 0);
}
used->len = len;
vq->vring.used->idx++;
used->len = len;
vq->vring.used->idx++;
- GateAll_leave(vq->gateH, key);
+ GateHwi_leave(vq->gateH, key);
return (0);
}
return (0);
}
vq->num_free--;
vq->num_free--;
- key = GateAll_enter(vq->gateH);
+ key = GateHwi_enter(vq->gateH);
avail = vq->vring.avail->idx++ % vq->vring.num;
vq->vring.desc[avail].addr = mapVAtoPA(buf);
vq->vring.desc[avail].len = RP_MSG_BUF_SIZE;
avail = vq->vring.avail->idx++ % vq->vring.num;
vq->vring.desc[avail].addr = mapVAtoPA(buf);
vq->vring.desc[avail].len = RP_MSG_BUF_SIZE;
- GateAll_leave(vq->gateH, key);
+ GateHwi_leave(vq->gateH, key);
return (vq->num_free);
}
return (vq->num_free);
}
Void *buf;
IArg key;
Void *buf;
IArg key;
- key = GateAll_enter(vq->gateH);
+ key = GateHwi_enter(vq->gateH);
/* There's nothing available? */
if (vq->last_used_idx == vq->vring.used->idx) {
buf = NULL;
/* There's nothing available? */
if (vq->last_used_idx == vq->vring.used->idx) {
buf = NULL;
buf = mapPAtoVA(vq->vring.desc[head].addr);
}
buf = mapPAtoVA(vq->vring.desc[head].addr);
}
- GateAll_leave(vq->gateH, key);
+ GateHwi_leave(vq->gateH, key);
return (buf);
}
return (buf);
}
Int16 head;
IArg key;
Int16 head;
IArg key;
- key = GateAll_enter(vq->gateH);
+ key = GateHwi_enter(vq->gateH);
Log_print6(Diags_USER1, "getAvailBuf vq: 0x%x %d %d %d 0x%x 0x%x\n",
(IArg)vq, vq->last_avail_idx, vq->vring.avail->idx, vq->vring.num,
(IArg)&vq->vring.avail, (IArg)vq->vring.avail);
Log_print6(Diags_USER1, "getAvailBuf vq: 0x%x %d %d %d 0x%x 0x%x\n",
(IArg)vq, vq->last_avail_idx, vq->vring.avail->idx, vq->vring.num,
(IArg)&vq->vring.avail, (IArg)vq->vring.avail);
*buf = mapPAtoVA(vq->vring.desc[head].addr);
*len = vq->vring.desc[head].len;
}
*buf = mapPAtoVA(vq->vring.desc[head].addr);
*len = vq->vring.desc[head].len;
}
- GateAll_leave(vq->gateH, key);
+ GateHwi_leave(vq->gateH, key);
return (head);
}
return (head);
}
@@ -504,7 +504,7 @@ VirtQueue_Handle VirtQueue_create(UInt16 remoteProcId, VirtQueue_Params *params,
}
/* Create the thread protection gate */
}
/* Create the thread protection gate */
- vq->gateH = GateAll_create(NULL, eb);
+ vq->gateH = GateHwi_create(NULL, eb);
if (Error_check(eb)) {
Log_error0("VirtQueue_create: could not create gate object");
Memory_free(NULL, vq, sizeof(VirtQueue_Object));
if (Error_check(eb)) {
Log_error0("VirtQueue_create: could not create gate object");
Memory_free(NULL, vq, sizeof(VirtQueue_Object));
@@ -545,7 +545,7 @@ VirtQueue_Handle VirtQueue_create(UInt16 remoteProcId, VirtQueue_Params *params,
break;
#endif
default:
break;
#endif
default:
- GateAll_delete(&vq->gateH);
+ GateHwi_delete(&vq->gateH);
Memory_free(NULL, vq, sizeof(VirtQueue_Object));
return (NULL);
}
Memory_free(NULL, vq, sizeof(VirtQueue_Object));
return (NULL);
}