Changeset 32ba5a6 in mainline
- Timestamp:
- 2011-12-26T22:08:24Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e67e1be
- Parents:
- 4005e37a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/buffer.h
r4005e37a r32ba5a6 64 64 { 65 65 fibril_mutex_lock(&buffer->guard); 66 66 67 /* Next position. */ 67 68 uint8_t *new_head = buffer->write_head + 1; 68 69 if (new_head == buffer->buffer_end) 69 70 new_head = buffer->buffer; 71 70 72 /* Buffer full. */ 71 73 while (new_head == buffer->read_head) 72 74 fibril_condvar_wait(&buffer->change, &buffer->guard); 75 73 76 /* Write data. */ 74 77 *buffer->write_head = data; … … 102 105 if (new_write_head == buffer->buffer_end) 103 106 new_write_head = buffer->buffer; 104 while(new_write_head == buffer->read_head)107 if (new_write_head == buffer->read_head) 105 108 fibril_condvar_broadcast(&buffer->change); 109 106 110 /* Move head */ 107 111 buffer->read_head = new_head;
Note:
See TracChangeset
for help on using the changeset viewer.