Changeset d30e067 in mainline for uspace/lib/c/generic/device/hw_res.c
- Timestamp:
- 2025-03-02T20:02:33Z (5 months ago)
- Children:
- 8cdf360
- Parents:
- 7debda3 (diff), 4285f384 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/device/hw_res.c
r7debda3 rd30e067 1 1 /* 2 * Copyright (c) 202 4Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * Copyright (c) 2010 Lenka Trochtova 4 4 * All rights reserved. … … 162 162 } 163 163 164 /** Get bus flags.164 /** Query legacy IO claims. 165 165 * 166 166 * @param sess HW res session 167 * @param r flags Place to store the flags168 * 169 * @return Error code. 170 * 171 */ 172 errno_t hw_res_ get_flags(async_sess_t *sess, hw_res_flags_t *rflags)173 { 174 async_exch_t *exch = async_exchange_begin(sess); 175 176 sysarg_t flags;167 * @param rclaims Place to store the claims 168 * 169 * @return Error code. 170 * 171 */ 172 errno_t hw_res_query_legacy_io(async_sess_t *sess, hw_res_claims_t *rclaims) 173 { 174 async_exch_t *exch = async_exchange_begin(sess); 175 176 sysarg_t claims; 177 177 const errno_t ret = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 178 HW_RES_ GET_FLAGS, &flags);178 HW_RES_QUERY_LEGACY_IO, &claims); 179 179 180 180 async_exchange_end(exch); 181 181 182 182 if (ret == EOK) 183 *rflags = flags; 183 *rclaims = claims; 184 185 return ret; 186 } 187 188 /** Claim legacy IO devices. 189 * 190 * @param sess HW res session 191 * @param claims Claims 192 * 193 * @return Error code. 194 * 195 */ 196 errno_t hw_res_claim_legacy_io(async_sess_t *sess, hw_res_claims_t claims) 197 { 198 async_exch_t *exch = async_exchange_begin(sess); 199 200 const errno_t ret = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE), 201 HW_RES_CLAIM_LEGACY_IO, claims); 202 203 async_exchange_end(exch); 184 204 185 205 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.