Changeset 90efa3b 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:
- deacd722
- Parents:
- c222816
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 02:44:44)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
- Location:
- kernel/generic
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
rc222816 r90efa3b 174 174 extern void ipc_init(void); 175 175 176 extern call_t *ipc_call_alloc( unsigned int);176 extern call_t *ipc_call_alloc(void); 177 177 178 178 extern errno_t ipc_call_sync(phone_t *, call_t *); -
kernel/generic/src/ipc/event.c
rc222816 r90efa3b 147 147 if (event->answerbox != NULL) { 148 148 if (!event->masked) { 149 call_t *call = ipc_call_alloc( FRAME_ATOMIC);149 call_t *call = ipc_call_alloc(); 150 150 151 151 if (call) { -
kernel/generic/src/ipc/ipc.c
rc222816 r90efa3b 108 108 * TASK->answerbox. 109 109 * 110 * @param flags Parameters for slab_alloc (e.g FRAME_ATOMIC). 111 * 112 * @return If flags permit it, return NULL, or initialized kernel 113 * call structure with one reference. 114 * 115 */ 116 call_t *ipc_call_alloc(unsigned int flags) 110 * @return Initialized kernel call structure with one reference, or NULL. 111 * 112 */ 113 call_t *ipc_call_alloc(void) 117 114 { 118 115 // TODO: Allocate call and kobject in single allocation 119 116 120 call_t *call = slab_alloc(call_cache, flags);117 call_t *call = slab_alloc(call_cache, FRAME_ATOMIC); 121 118 if (!call) 122 119 return NULL; 123 120 124 kobject_t *kobj; 125 if (flags & FRAME_ATOMIC) 126 kobj = (kobject_t *) malloc(sizeof(kobject_t)); 127 else 128 kobj = (kobject_t *) nfmalloc(sizeof(kobject_t)); 129 121 kobject_t *kobj = (kobject_t *) malloc(sizeof(kobject_t)); 130 122 if (!kobj) { 131 123 slab_free(call_cache, call); -
kernel/generic/src/ipc/ipcrsc.c
rc222816 r90efa3b 81 81 return ENOMEM; 82 82 } 83 call_t *hcall = ipc_call_alloc( FRAME_ATOMIC);83 call_t *hcall = ipc_call_alloc(); 84 84 if (!hcall) { 85 85 cap_free(TASK, handle); -
kernel/generic/src/ipc/irq.c
rc222816 r90efa3b 529 529 530 530 if (irq->notif_cfg.answerbox) { 531 call_t *call = ipc_call_alloc( FRAME_ATOMIC);531 call_t *call = ipc_call_alloc(); 532 532 if (!call) 533 533 return; … … 565 565 566 566 if (irq->notif_cfg.answerbox) { 567 call_t *call = ipc_call_alloc( FRAME_ATOMIC);567 call_t *call = ipc_call_alloc(); 568 568 if (!call) { 569 569 irq_spinlock_unlock(&irq->lock, true); -
kernel/generic/src/ipc/sysipc.c
rc222816 r90efa3b 277 277 return ENOENT; 278 278 279 call_t *call = ipc_call_alloc( FRAME_ATOMIC);279 call_t *call = ipc_call_alloc(); 280 280 if (!call) { 281 281 kobject_put(kobj); … … 379 379 } 380 380 381 call_t *call = ipc_call_alloc( FRAME_ATOMIC);381 call_t *call = ipc_call_alloc(); 382 382 if (!call) { 383 383 kobject_put(kobj); … … 431 431 } 432 432 433 call_t *call = ipc_call_alloc( FRAME_ATOMIC);433 call_t *call = ipc_call_alloc(); 434 434 if (!call) { 435 435 kobject_put(kobj);
Note:
See TracChangeset
for help on using the changeset viewer.