Changeset 8820544 in mainline for uspace/srv
- Timestamp:
- 2014-08-16T00:02:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 35b8bfe, 8cd680c
- Parents:
- 83f29e0
- Location:
- uspace/srv
- Files:
-
- 12 edited
-
hid/input/input.c (modified) (3 diffs)
-
hid/input/port/msim.c (modified) (3 diffs)
-
hid/input/port/ns16550.c (modified) (4 diffs)
-
hid/input/port/pl050.c (modified) (3 diffs)
-
hid/remcons/remcons.c (modified) (1 diff)
-
hid/remcons/user.c (modified) (1 diff)
-
hid/s3c24xx_ts/s3c24xx_ts.c (modified) (3 diffs)
-
hw/bus/cuda_adb/cuda_adb.c (modified) (3 diffs)
-
hw/char/s3c24xx_uart/s3c24xx_uart.c (modified) (3 diffs)
-
klog/klog.c (modified) (5 diffs)
-
taskmon/taskmon.c (modified) (4 diffs)
-
vfs/vfs.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/input.c
r83f29e0 r8820544 54 54 #include <io/keycode.h> 55 55 #include <loc.h> 56 #include <event.h>57 56 #include <str_error.h> 58 57 #include "layout.h" … … 358 357 } 359 358 360 static void kconsole_event_received(ipc_callid_t callid, ipc_call_t *call) 359 static void kconsole_event_handler(ipc_callid_t callid, ipc_call_t *call, 360 void *arg) 361 361 { 362 362 if (IPC_GET_ARG1(*call)) { … … 772 772 773 773 /* Receive kernel notifications */ 774 async_set_interrupt_received(kconsole_event_received); 775 rc = event_subscribe(EVENT_KCONSOLE, 0); 774 rc = async_event_subscribe(EVENT_KCONSOLE, kconsole_event_handler, NULL); 776 775 if (rc != EOK) 777 776 printf("%s: Failed to register kconsole notifications (%s)\n", -
uspace/srv/hid/input/port/msim.c
r83f29e0 r8820544 78 78 }; 79 79 80 static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call); 80 static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *arg) 81 { 82 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call)); 83 } 81 84 82 85 static int msim_port_init(kbd_dev_t *kdev) … … 94 97 msim_ranges[0].base = paddr; 95 98 msim_cmds[0].addr = (void *) paddr; 96 async_ set_interrupt_received(msim_irq_handler);97 irq_register(inr, device_assign_devno(), 0,&msim_kbd);99 async_irq_subscribe(inr, device_assign_devno(), msim_irq_handler, NULL, 100 &msim_kbd); 98 101 99 102 return 0; … … 105 108 } 106 109 107 static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call)108 {109 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call));110 }111 112 110 /** @} 113 111 */ -
uspace/srv/hid/input/port/ns16550.c
r83f29e0 r8820544 107 107 }; 108 108 109 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call); 109 static uintptr_t ns16550_physical; 110 static kbd_dev_t *kbd_dev; 111 static sysarg_t inr; 110 112 111 static uintptr_t ns16550_physical; 112 113 static kbd_dev_t *kbd_dev; 113 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *arg) 114 { 115 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call)); 116 117 if (irc_service) { 118 async_exch_t *exch = async_exchange_begin(irc_sess); 119 async_msg_1(exch, IRC_CLEAR_INTERRUPT, inr); 120 async_exchange_end(exch); 121 } 122 } 114 123 115 124 static int ns16550_port_init(kbd_dev_t *kdev) 116 125 { 117 void *vaddr;118 119 126 kbd_dev = kdev; 120 127 … … 128 135 return -1; 129 136 130 sysarg_t inr;131 137 if (sysinfo_get_value("kbd.inr", &inr) != EOK) 132 138 return -1; … … 136 142 ns16550_kbd.cmds[3].addr = (void *) (ns16550_physical + RBR_REG); 137 143 138 async_ set_interrupt_received(ns16550_irq_handler);139 irq_register(inr, device_assign_devno(), inr,&ns16550_kbd);144 async_irq_subscribe(inr, device_assign_devno(), ns16550_irq_handler, NULL, 145 &ns16550_kbd); 140 146 147 void *vaddr; 141 148 return pio_enable((void *) ns16550_physical, 8, &vaddr); 142 149 } … … 147 154 } 148 155 149 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call)150 {151 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call));152 153 if (irc_service) {154 async_exch_t *exch = async_exchange_begin(irc_sess);155 async_msg_1(exch, IRC_CLEAR_INTERRUPT, IPC_GET_IMETHOD(*call));156 async_exchange_end(exch);157 }158 }159 160 156 /** 161 157 * @} -
uspace/srv/hid/input/port/pl050.c
r83f29e0 r8820544 101 101 }; 102 102 103 static void pl050_irq_handler(ipc_callid_t iid, ipc_call_t *call); 103 static void pl050_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *arg) 104 { 105 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call)); 106 } 104 107 105 108 static int pl050_port_init(kbd_dev_t *kdev) … … 119 122 return -1; 120 123 121 async_ set_interrupt_received(pl050_irq_handler);122 irq_register(inr, device_assign_devno(), 0,&pl050_kbd);124 async_irq_subscribe(inr, device_assign_devno(), pl050_irq_handler, NULL, 125 &pl050_kbd); 123 126 124 127 return 0; … … 130 133 } 131 134 132 static void pl050_irq_handler(ipc_callid_t iid, ipc_call_t *call)133 {134 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call));135 }136 137 135 /** 138 136 * @} -
uspace/srv/hid/remcons/remcons.c
r83f29e0 r8820544 40 40 #include <str_error.h> 41 41 #include <loc.h> 42 #include <event.h>43 42 #include <io/keycode.h> 44 43 #include <align.h> -
uspace/srv/hid/remcons/user.c
r83f29e0 r8820544 38 38 #include <str_error.h> 39 39 #include <loc.h> 40 #include <event.h>41 40 #include <io/keycode.h> 42 41 #include <align.h> -
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
r83f29e0 r8820544 72 72 static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall, 73 73 void *arg); 74 static void s3c24xx_ts_irq_handler(ipc_callid_t iid, ipc_call_t *call );74 static void s3c24xx_ts_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *); 75 75 static void s3c24xx_ts_pen_down(s3c24xx_ts_t *ts); 76 76 static void s3c24xx_ts_pen_up(s3c24xx_ts_t *ts); … … 138 138 (void *) ts->paddr, inr); 139 139 140 async_ set_interrupt_received(s3c24xx_ts_irq_handler);141 irq_register(inr, device_assign_devno(), 0, &ts_irq_code);140 async_irq_subscribe(inr, device_assign_devno(), s3c24xx_ts_irq_handler, 141 NULL, &ts_irq_code); 142 142 143 143 s3c24xx_ts_wait_for_int_mode(ts, updn_down); … … 204 204 205 205 /** Handle touchscreen interrupt */ 206 static void s3c24xx_ts_irq_handler(ipc_callid_t iid, ipc_call_t *call) 206 static void s3c24xx_ts_irq_handler(ipc_callid_t iid, ipc_call_t *call, 207 void *arg) 207 208 { 208 209 ts_updn_t updn; -
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
r83f29e0 r8820544 55 55 static void cuda_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg); 56 56 static int cuda_init(void); 57 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call );57 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *arg); 58 58 59 59 static void cuda_irq_listen(void); … … 282 282 cuda_irq_code.ranges[0].base = (uintptr_t) instance->cuda_physical; 283 283 cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_physical)->ifr; 284 async_ set_interrupt_received(cuda_irq_handler);285 irq_register(10, device_assign_devno(), 0,&cuda_irq_code);284 async_irq_subscribe(10, device_assign_devno(), cuda_irq_handler, NULL, 285 &cuda_irq_code); 286 286 287 287 /* Enable SR interrupt. */ … … 295 295 } 296 296 297 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call )297 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *arg) 298 298 { 299 299 uint8_t rbuf[CUDA_RCV_BUF_SIZE]; -
uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
r83f29e0 r8820544 68 68 static s3c24xx_uart_t *uart; 69 69 70 static void s3c24xx_uart_connection(ipc_callid_t iid, ipc_call_t *icall, 71 void *arg); 72 static void s3c24xx_uart_irq_handler(ipc_callid_t iid, ipc_call_t *call); 73 static int s3c24xx_uart_init(s3c24xx_uart_t *uart); 74 static void s3c24xx_uart_sendb(s3c24xx_uart_t *uart, uint8_t byte); 70 static void s3c24xx_uart_connection(ipc_callid_t, ipc_call_t *, void *); 71 static void s3c24xx_uart_irq_handler(ipc_callid_t, ipc_call_t *, void *); 72 static int s3c24xx_uart_init(s3c24xx_uart_t *); 73 static void s3c24xx_uart_sendb(s3c24xx_uart_t *, uint8_t); 75 74 76 75 int main(int argc, char *argv[]) … … 150 149 } 151 150 152 static void s3c24xx_uart_irq_handler(ipc_callid_t iid, ipc_call_t *call) 153 { 154 (void) iid; (void) call; 151 static void s3c24xx_uart_irq_handler(ipc_callid_t iid, ipc_call_t *call, 152 void *arg) 153 { 154 (void) iid; 155 (void) call; 156 (void) arg; 155 157 156 158 while ((pio_read_32(&uart->io->ufstat) & S3C24XX_UFSTAT_RX_COUNT) != 0) { … … 192 194 (void *) uart->paddr, inr); 193 195 194 async_set_interrupt_received(s3c24xx_uart_irq_handler); 195 196 irq_register(inr, device_assign_devno(), 0, &uart_irq_code); 196 async_irq_subscribe(inr, device_assign_devno(), s3c24xx_uart_irq_handler, 197 NULL, &uart_irq_code); 197 198 198 199 /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */ -
uspace/srv/klog/klog.c
r83f29e0 r8820544 40 40 #include <as.h> 41 41 #include <ddi.h> 42 #include <event.h>43 42 #include <errno.h> 44 43 #include <str_error.h> … … 193 192 * 194 193 */ 195 static void notification_received(ipc_callid_t callid, ipc_call_t *call) 194 static void klog_notification_received(ipc_callid_t callid, ipc_call_t *call, 195 void *arg) 196 196 { 197 197 /* … … 205 205 producer(); 206 206 207 event_unmask(EVENT_KLOG);207 async_event_unmask(EVENT_KLOG); 208 208 fibril_mutex_unlock(&mtx); 209 209 } … … 229 229 230 230 prodcons_initialize(&pc); 231 async_set_interrupt_received(notification_received); 232 rc = event_subscribe(EVENT_KLOG, 0); 231 rc = async_event_subscribe(EVENT_KLOG, klog_notification_received, NULL); 233 232 if (rc != EOK) { 234 233 log_msg(LOG_DEFAULT, LVL_ERROR, … … 245 244 246 245 fibril_add_ready(fid); 247 event_unmask(EVENT_KLOG);246 async_event_unmask(EVENT_KLOG); 248 247 249 248 fibril_mutex_lock(&mtx); -
uspace/srv/taskmon/taskmon.c
r83f29e0 r8820544 40 40 #include <sys/typefmt.h> 41 41 #include <task.h> 42 #include <event.h>43 42 #include <ipc/corecfg.h> 44 43 #include <loc.h> … … 53 52 static void corecfg_client_conn(ipc_callid_t , ipc_call_t *, void *); 54 53 55 static void fault_event(ipc_callid_t callid, ipc_call_t *call )54 static void fault_event(ipc_callid_t callid, ipc_call_t *call, void *arg) 56 55 { 57 56 const char *fname; … … 143 142 write_core_files = false; 144 143 #endif 145 if ( event_subscribe(EVENT_FAULT, 0) != EOK) {144 if (async_event_subscribe(EVENT_FAULT, fault_event, NULL) != EOK) { 146 145 printf("%s: Error registering fault notifications.\n", NAME); 147 146 return -1; … … 165 164 } 166 165 167 async_set_interrupt_received(fault_event);168 166 task_retval(0); 169 167 async_manager(); -
uspace/srv/vfs/vfs.c
r83f29e0 r8820544 38 38 #include <vfs/vfs.h> 39 39 #include <ipc/services.h> 40 #include <abi/ipc/event.h>41 #include <event.h>42 40 #include <ns.h> 43 41 #include <async.h> … … 53 51 #define NAME "vfs" 54 52 55 enum {56 VFS_TASK_STATE_CHANGE57 };58 59 53 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 60 54 { … … 145 139 } 146 140 147 static void notification_ received(ipc_callid_t callid, ipc_call_t *call)141 static void notification_handler(ipc_callid_t callid, ipc_call_t *call, void *arg) 148 142 { 149 switch (IPC_GET_IMETHOD(*call)) { 150 case VFS_TASK_STATE_CHANGE: 151 if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE) 152 vfs_pass_handle( 153 (task_id_t) MERGE_LOUP32(IPC_GET_ARG4(*call), 154 IPC_GET_ARG5(*call)), call->in_task_id, 155 (int) IPC_GET_ARG2(*call)); 156 break; 157 default: 158 break; 159 } 143 if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE) 144 vfs_pass_handle( 145 (task_id_t) MERGE_LOUP32(IPC_GET_ARG4(*call), 146 IPC_GET_ARG5(*call)), call->in_task_id, 147 (int) IPC_GET_ARG2(*call)); 160 148 } 161 149 … … 196 184 197 185 /* 198 * S et notification handler and subscribe to notifications.199 */ 200 async_ set_interrupt_received(notification_received);201 event_task_subscribe(EVENT_TASK_STATE_CHANGE, VFS_TASK_STATE_CHANGE);186 * Subscribe to notifications. 187 */ 188 async_event_task_subscribe(EVENT_TASK_STATE_CHANGE, notification_handler, 189 NULL); 202 190 203 191 /*
Note:
See TracChangeset
for help on using the changeset viewer.
