Changeset ccd1a14 in mainline for uspace/srv/kbd/port/ski.c
- Timestamp:
- 2009-04-25T11:54:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9701d49
- Parents:
- ebfabf6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/kbd/port/ski.c
rebfabf6 rccd1a14 43 43 #include <sys/types.h> 44 44 #include <thread.h> 45 #include <bool.h> 45 46 46 47 #define SKI_GETCHAR 21 … … 50 51 static void *ski_thread_impl(void *arg); 51 52 static int32_t ski_getchar(void); 53 54 static volatile bool polling_disabled = false; 52 55 53 56 /** Initialize Ski port driver. */ … … 65 68 } 66 69 70 void kbd_port_yield(void) 71 { 72 polling_disabled = true; 73 } 74 75 void kbd_port_reclaim(void) 76 { 77 polling_disabled = false; 78 } 79 67 80 /** Thread to poll Ski for keypresses. */ 68 81 static void *ski_thread_impl(void *arg) … … 72 85 73 86 while (1) { 74 while ( 1) {87 while (polling_disabled == false) { 75 88 c = ski_getchar(); 76 89 if (c == 0)
Note:
See TracChangeset
for help on using the changeset viewer.