Changeset b389f95 in mainline
- Timestamp:
- 2018-11-09T22:03:24Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4f3aa76
- Parents:
- deacd722
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 02:55:57)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
- Location:
- kernel/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
rdeacd722 rb389f95 325 325 326 326 /* Introspection functions. */ 327 extern void as_get_area_info(as_t *, as_area_info_t **, size_t *);327 extern as_area_info_t *as_get_area_info(as_t *, size_t *); 328 328 extern void as_print(as_t *); 329 329 -
kernel/generic/src/mm/as.c
rdeacd722 rb389f95 2237 2237 * 2238 2238 */ 2239 void as_get_area_info(as_t *as, as_area_info_t **obuf, size_t *osize)2239 as_area_info_t *as_get_area_info(as_t *as, size_t *osize) 2240 2240 { 2241 2241 mutex_lock(&as->lock); … … 2245 2245 2246 2246 size_t isize = area_cnt * sizeof(as_area_info_t); 2247 as_area_info_t *info = nfmalloc(isize); 2247 as_area_info_t *info = malloc(isize); 2248 if (!info) { 2249 mutex_unlock(&as->lock); 2250 return NULL; 2251 } 2248 2252 2249 2253 /* Record area data. */ … … 2267 2271 mutex_unlock(&as->lock); 2268 2272 2269 *obuf = info;2270 2273 *osize = isize; 2274 return info; 2271 2275 } 2272 2276 -
kernel/generic/src/udebug/udebug_ipc.c
rdeacd722 rb389f95 266 266 size_t data_size; 267 267 size_t buf_size; 268 void*data;268 as_area_info_t *data; 269 269 270 270 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */ … … 274 274 * Read area list. 275 275 */ 276 as_get_area_info(AS, (as_area_info_t **) &data, &data_size); 276 data = as_get_area_info(AS, &data_size); 277 if (!data) { 278 IPC_SET_RETVAL(call->data, ENOMEM); 279 ipc_answer(&TASK->kb.box, call); 280 return; 281 } 277 282 278 283 /* Copy MAX(buf_size, data_size) bytes */ … … 297 302 298 303 IPC_SET_ARG3(call->data, data_size); 299 call->buffer = data;304 call->buffer = (uint8_t *) data; 300 305 301 306 ipc_answer(&TASK->kb.box, call);
Note:
See TracChangeset
for help on using the changeset viewer.