Changeset c997374 in mainline for uspace/lib/device/src/hr.c
- Timestamp:
- 2024-10-10T13:31:42Z (10 months ago)
- Children:
- 4b759dc
- Parents:
- 2b8901be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/device/src/hr.c
r2b8901be rc997374 87 87 } 88 88 89 errno_t hr_create(hr_t *hr, hr_config_t *hr_config )89 errno_t hr_create(hr_t *hr, hr_config_t *hr_config, bool assemble) 90 90 { 91 91 errno_t rc, retval; … … 97 97 return EINVAL; 98 98 99 req = async_send_0(exch, HR_CREATE, NULL); 100 101 rc = async_data_write_start(exch, hr_config, sizeof(hr_config_t)); 102 if (rc != EOK) { 103 async_exchange_end(exch); 104 async_forget(req); 105 return rc; 106 } 107 108 async_exchange_end(exch); 109 async_wait_for(req, &retval); 110 if (retval != EOK) 111 return retval; 112 113 return EOK; 114 } 115 116 errno_t hr_assemble(hr_t *hr, hr_config_t *hr_config) 117 { 118 errno_t rc, retval; 119 async_exch_t *exch; 120 aid_t req; 121 122 exch = async_exchange_begin(hr->sess); 123 if (exch == NULL) 124 return EINVAL; 125 126 req = async_send_0(exch, HR_ASSEMBLE, NULL); 99 req = async_send_0(exch, assemble ? HR_ASSEMBLE : HR_CREATE, NULL); 127 100 128 101 rc = async_data_write_start(exch, hr_config, sizeof(hr_config_t));
Note:
See TracChangeset
for help on using the changeset viewer.