src/mess/device.c
| r3039 | r3040 | |
| 151 | 151 | { |
| 152 | 152 | mess_device_config *mess_device = (mess_device_config *) device->inline_config; |
| 153 | 153 | mess_device_token *token = (mess_device_token *) device->token; |
| 154 | device_start_func inner_start; |
| 154 | 155 | |
| 155 | 156 | /* initialize the tag pool */ |
| 156 | 157 | tagpool_init(&token->tagpool); |
| 157 | 158 | |
| 158 | 159 | /* if present, invoke the start handler */ |
| 159 | | if (mess_device->io_device.start != NULL) |
| 160 | | (*mess_device->io_device.start)(device); |
| 160 | inner_start = (device_start_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_START); |
| 161 | if (inner_start != NULL) |
| 162 | (*inner_start)(device); |
| 161 | 163 | } |
| 162 | 164 | |
| 163 | 165 | |
| r3039 | r3040 | |
| 171 | 173 | { |
| 172 | 174 | mess_device_config *mess_device = (mess_device_config *) device->inline_config; |
| 173 | 175 | mess_device_token *token = (mess_device_token *) device->token; |
| 176 | device_stop_func inner_stop; |
| 174 | 177 | |
| 175 | 178 | /* if present, invoke the stop handler */ |
| 176 | | if (mess_device->io_device.stop != NULL) |
| 177 | | (*mess_device->io_device.stop)(device); |
| 179 | inner_stop = (device_stop_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_STOP); |
| 180 | if (inner_stop != NULL) |
| 181 | (*inner_stop)(device); |
| 178 | 182 | |
| 179 | 183 | /* tear down the tag pool */ |
| 180 | 184 | tagpool_exit(&token->tagpool); |
| r3039 | r3040 | |
| 383 | 387 | mess_device->io_device.reset_on_load = mess_device_get_info_int(&mess_device->io_device.devclass, MESS_DEVINFO_INT_RESET_ON_LOAD) ? 1 : 0; |
| 384 | 388 | mess_device->io_device.load_at_init = mess_device_get_info_int(&mess_device->io_device.devclass, MESS_DEVINFO_INT_LOAD_AT_INIT) ? 1 : 0; |
| 385 | 389 | |
| 386 | | mess_device->io_device.start = (device_start_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_START); |
| 387 | | mess_device->io_device.stop = (device_stop_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_STOP); |
| 388 | | |
| 389 | 390 | /* determine the dispositions */ |
| 390 | 391 | getdispositions = (device_getdispositions_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_GET_DISPOSITIONS); |
| 391 | 392 | if (getdispositions != NULL) |