Changeset cf3aee19 in mainline for kernel/generic/src
- Timestamp:
- 2015-06-17T23:45:24Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 523b17a
- Parents:
- fc7bf19 (diff), 2654afb (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. - Location:
- kernel/generic/src
- Files:
-
- 7 edited
-
ipc/ops/conctmeto.c (modified) (3 diffs)
-
ipc/sysipc.c (modified) (2 diffs)
-
lib/func.c (modified) (1 diff)
-
mm/as.c (modified) (4 diffs)
-
mm/slab.c (modified) (2 diffs)
-
synch/futex.c (modified) (1 diff)
-
udebug/udebug_ops.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/conctmeto.c
rfc7bf19 rcf3aee19 44 44 int newphid = phone_alloc(TASK); 45 45 46 /* Remember the phoneid or the error. */ 47 call->priv = newphid; 46 48 if (newphid < 0) 47 49 return ELIMIT; … … 49 51 /* Set arg5 for server */ 50 52 IPC_SET_ARG5(call->data, (sysarg_t) &TASK->phones[newphid]); 51 call->priv = newphid;52 53 53 54 return EOK; … … 73 74 static int answer_process(call_t *answer) 74 75 { 75 if (IPC_GET_RETVAL(answer->data)) 76 phone_dealloc(answer->priv); 77 else 78 IPC_SET_ARG5(answer->data, answer->priv); 76 int newphid = (int) answer->priv; 77 78 if (IPC_GET_RETVAL(answer->data)) { 79 if (newphid >= 0) { 80 /* 81 * The phone was indeed allocated and now needs 82 * to be deallocated. 83 */ 84 phone_dealloc(newphid); 85 } 86 } else { 87 IPC_SET_ARG5(answer->data, newphid); 88 } 79 89 80 90 return EOK; -
kernel/generic/src/ipc/sysipc.c
rfc7bf19 rcf3aee19 388 388 { 389 389 call_t *call = get_call(callid); 390 phone_t *phone;391 bool need_old = answer_need_old(call);392 bool after_forward = false;393 ipc_data_t old;394 int rc;395 396 390 if (!call) 397 391 return ENOENT; 398 392 393 ipc_data_t old; 394 bool need_old = answer_need_old(call); 399 395 if (need_old) 400 396 old = call->data; 397 398 bool after_forward = false; 399 int rc; 400 phone_t *phone; 401 401 402 402 if (phone_get(phoneid, &phone) != EOK) { … … 409 409 goto error; 410 410 } 411 411 412 412 call->flags |= IPC_CALL_FORWARDED; 413 413 -
kernel/generic/src/lib/func.c
rfc7bf19 rcf3aee19 51 51 * 52 52 */ 53 void halt( )53 void halt(void) 54 54 { 55 55 #if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE)) -
kernel/generic/src/mm/as.c
rfc7bf19 rcf3aee19 834 834 if ((cond = (bool) node->keys)) { 835 835 uintptr_t ptr = node->key[node->keys - 1]; 836 size_t size =836 size_t node_size = 837 837 (size_t) node->value[node->keys - 1]; 838 838 size_t i = 0; 839 839 840 if (overlaps(ptr, P2SZ( size), area->base,840 if (overlaps(ptr, P2SZ(node_size), area->base, 841 841 P2SZ(pages))) { 842 842 843 if (ptr + P2SZ( size) <= start_free) {843 if (ptr + P2SZ(node_size) <= start_free) { 844 844 /* 845 845 * The whole interval fits … … 860 860 i = (start_free - ptr) >> PAGE_WIDTH; 861 861 if (!used_space_remove(area, start_free, 862 size - i))862 node_size - i)) 863 863 panic("Cannot remove used space."); 864 864 } else { … … 867 867 * completely removed. 868 868 */ 869 if (!used_space_remove(area, ptr, size))869 if (!used_space_remove(area, ptr, node_size)) 870 870 panic("Cannot remove used space."); 871 871 } … … 887 887 area->pages - pages); 888 888 889 for (; i < size; i++) {889 for (; i < node_size; i++) { 890 890 pte_t *pte = page_mapping_find(as, 891 891 ptr + P2SZ(i), false); -
kernel/generic/src/mm/slab.c
rfc7bf19 rcf3aee19 610 610 unsigned int kmflag), size_t (*destructor)(void *obj), unsigned int flags) 611 611 { 612 ASSERT(size > 0); 613 612 614 memsetb(cache, sizeof(*cache), 0); 613 615 cache->name = name; … … 888 890 /* Initialize magazine cache */ 889 891 _slab_cache_create(&mag_cache, "slab_magazine_t", 890 sizeof(slab_magazine_t) + SLAB_MAG_SIZE * sizeof(void *),892 sizeof(slab_magazine_t) + SLAB_MAG_SIZE * sizeof(void *), 891 893 sizeof(uintptr_t), NULL, NULL, SLAB_CACHE_NOMAGAZINE | 892 894 SLAB_CACHE_SLINSIDE); -
kernel/generic/src/synch/futex.c
rfc7bf19 rcf3aee19 400 400 return (sysarg_t) ENOENT; 401 401 402 #ifdef CONFIG_UDEBUG 403 udebug_stoppable_begin(); 404 #endif 405 402 406 int rc = waitq_sleep_timeout(&futex->wq, 0, SYNCH_FLAGS_INTERRUPTIBLE); 407 408 #ifdef CONFIG_UDEBUG 409 udebug_stoppable_end(); 410 #endif 403 411 404 412 return (sysarg_t) rc; -
kernel/generic/src/udebug/udebug_ops.c
rfc7bf19 rcf3aee19 375 375 if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) { 376 376 mutex_unlock(&TASK->udebug.lock); 377 free(id_buffer); 377 378 return EINVAL; 378 379 } … … 456 457 int udebug_args_read(thread_t *thread, void **buffer) 457 458 { 458 /* Prepare a buffer to hold the arguments. */459 sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), 0);460 461 459 /* On success, this will lock t->udebug.lock. */ 462 460 int rc = _thread_op_begin(thread, false); … … 471 469 } 472 470 471 /* Prepare a buffer to hold the arguments. */ 472 sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), 0); 473 473 474 /* Copy to a local buffer before releasing the lock. */ 474 475 memcpy(arg_buffer, thread->udebug.syscall_args, 6 * sizeof(sysarg_t)); … … 499 500 int udebug_regs_read(thread_t *thread, void **buffer) 500 501 { 501 /* Prepare a buffer to hold the data. */502 istate_t *state_buf = malloc(sizeof(istate_t), 0);503 504 502 /* On success, this will lock t->udebug.lock */ 505 503 int rc = _thread_op_begin(thread, false); … … 512 510 return EBUSY; 513 511 } 512 513 /* Prepare a buffer to hold the data. */ 514 istate_t *state_buf = malloc(sizeof(istate_t), 0); 514 515 515 516 /* Copy to the allocated buffer */
Note:
See TracChangeset
for help on using the changeset viewer.
