Changeset a6e55886 in mainline for kernel/generic/src/proc
- Timestamp:
- 2018-11-01T14:30:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d1da1ff2
- Parents:
- bab75df6
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-01 14:30:03)
- git-committer:
- GitHub <noreply@…> (2018-11-01 14:30:03)
- Location:
- kernel/generic/src/proc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
rbab75df6 ra6e55886 363 363 364 364 /* 365 * Through the ' THE' structure, we keep track of THREAD, TASK, CPU, AS366 * and preemption counter. At this point THEcould be coming either365 * Through the 'CURRENT' structure, we keep track of THREAD, TASK, CPU, AS 366 * and preemption counter. At this point CURRENT could be coming either 367 367 * from THREAD's or CPU's stack. 368 368 * 369 369 */ 370 the_copy(THE, (the_t *) CPU->stack);370 current_copy(CURRENT, (current_t *) CPU->stack); 371 371 372 372 /* … … 548 548 * thread's stack. 549 549 */ 550 the_copy(THE, (the_t *) THREAD->kstack);550 current_copy(CURRENT, (current_t *) THREAD->kstack); 551 551 552 552 context_restore(&THREAD->saved_context); -
kernel/generic/src/proc/the.c
rbab75df6 ra6e55886 33 33 /** 34 34 * @file 35 * @brief THEstructure functions.35 * @brief CURRENT structure functions. 36 36 * 37 * This file contains functions to manage the THEstructure.38 * The THEstructure exists at the base address of every kernel37 * This file contains functions to manage the CURRENT structure. 38 * The CURRENT structure exists at the base address of every kernel 39 39 * stack and carries information about current settings 40 40 * (e.g. current CPU, current thread, task and address space … … 45 45 #include <assert.h> 46 46 47 /** Initialize THEstructure47 /** Initialize CURRENT structure 48 48 * 49 * Initialize THEstructure passed as argument.49 * Initialize CURRENT structure passed as argument. 50 50 * 51 * @param the THEstructure to be initialized.51 * @param the CURRENT structure to be initialized. 52 52 * 53 53 */ 54 void the_initialize(the_t *the)54 void current_initialize(current_t *the) 55 55 { 56 56 the->preemption = 0; … … 65 65 } 66 66 67 /** Copy THEstructure67 /** Copy CURRENT structure 68 68 * 69 * Copy the source THE structure to the destination THEstructure.69 * Copy the source CURRENT structure to the destination CURRENT structure. 70 70 * 71 * @param src The source THEstructure.72 * @param dst The destination THEstructure.71 * @param src The source CURRENT structure. 72 * @param dst The destination CURRENT structure. 73 73 * 74 74 */ 75 NO_TRACE void the_copy(the_t *src, the_t *dst)75 NO_TRACE void current_copy(current_t *src, current_t *dst) 76 76 { 77 77 assert(src->magic == MAGIC); -
kernel/generic/src/proc/thread.c
rbab75df6 ra6e55886 356 356 (uintptr_t) thread->kstack, STACK_SIZE); 357 357 358 the_initialize((the_t *) thread->kstack);358 current_initialize((current_t *) thread->kstack); 359 359 360 360 ipl_t ipl = interrupts_disable();
Note:
See TracChangeset
for help on using the changeset viewer.