Changeset 508b0df1 in mainline for uspace/srv/hid/console/console.c
- Timestamp:
- 2018-09-06T20:21:52Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 78de83de, fc10e1b
- Parents:
- 4621d23
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-13 03:53:39)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-06 20:21:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
r4621d23 r508b0df1 34 34 35 35 #include <async.h> 36 #include <atomic.h>37 36 #include <stdio.h> 38 37 #include <adt/prodcons.h> … … 51 50 #include <task.h> 52 51 #include <fibril_synch.h> 52 #include <stdatomic.h> 53 53 #include <stdlib.h> 54 54 #include <str.h> … … 61 61 62 62 typedef struct { 63 atomic_ trefcnt; /**< Connection reference count */63 atomic_flag refcnt; /**< Connection reference count */ 64 64 prodcons_t input_pc; /**< Incoming keyboard events */ 65 65 … … 524 524 } 525 525 526 if ( atomic_postinc(&cons->refcnt) == 0)526 if (!atomic_flag_test_and_set(&cons->refcnt)) 527 527 cons_set_cursor_vis(cons, true); 528 528 … … 612 612 for (size_t i = 0; i < CONSOLE_COUNT; i++) { 613 613 consoles[i].index = i; 614 atomic_ set(&consoles[i].refcnt, 0);614 atomic_flag_clear(&consoles[i].refcnt); 615 615 fibril_mutex_initialize(&consoles[i].mtx); 616 616 prodcons_initialize(&consoles[i].input_pc);
Note:
See TracChangeset
for help on using the changeset viewer.