diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-23 08:11:23 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-23 08:11:23 +0000 |
commit | 4ec82f62c18894d92bafc6c6f98784650106373d (patch) | |
tree | a0cec5585dff0434608241c373b9ad30af5ae869 /os/kernel/src/chqueues.c | |
parent | c877f5bfcc5301b441c9b13e8c32d83e9df04f37 (diff) | |
parent | 2a494cb534dbe3535a9bf4c61dfbc8b6c9e750be (diff) | |
download | ChibiOS-4ec82f62c18894d92bafc6c6f98784650106373d.tar.gz ChibiOS-4ec82f62c18894d92bafc6c6f98784650106373d.tar.bz2 ChibiOS-4ec82f62c18894d92bafc6c6f98784650106373d.zip |
I2C. 1 - Merge code from trunk. 2 - Fix driver problems detected by the CH_DBG_SYSTEM_STATE_CHECK
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3249 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chqueues.c')
-rw-r--r-- | os/kernel/src/chqueues.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/kernel/src/chqueues.c b/os/kernel/src/chqueues.c index 8532f8307..cf3d21732 100644 --- a/os/kernel/src/chqueues.c +++ b/os/kernel/src/chqueues.c @@ -108,6 +108,8 @@ void chIQInit(InputQueue *iqp, uint8_t *bp, size_t size, qnotify_t infy) { */
void chIQResetI(InputQueue *iqp) {
+ chDbgCheckClassI();
+
iqp->q_rdptr = iqp->q_wrptr = iqp->q_buffer;
iqp->q_counter = 0;
while (notempty(&iqp->q_waiting))
@@ -129,6 +131,8 @@ void chIQResetI(InputQueue *iqp) { */
msg_t chIQPutI(InputQueue *iqp, uint8_t b) {
+ chDbgCheckClassI();
+
if (chIQIsFullI(iqp))
return Q_FULL;
@@ -284,6 +288,8 @@ void chOQInit(OutputQueue *oqp, uint8_t *bp, size_t size, qnotify_t onfy) { */
void chOQResetI(OutputQueue *oqp) {
+ chDbgCheckClassI();
+
oqp->q_rdptr = oqp->q_wrptr = oqp->q_buffer;
oqp->q_counter = chQSizeI(oqp);
while (notempty(&oqp->q_waiting))
@@ -349,6 +355,8 @@ msg_t chOQPutTimeout(OutputQueue *oqp, uint8_t b, systime_t time) { msg_t chOQGetI(OutputQueue *oqp) {
uint8_t b;
+ chDbgCheckClassI();
+
if (chOQIsEmptyI(oqp))
return Q_EMPTY;
|