Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 9ad289d in mainline


Ignore:
Timestamp:
2013-02-23T14:04:55Z (9 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
088b334
Parents:
3acd1bb (diff), df64dbc (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.
Message:

Merge mainline changes

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/istate.h

    r3acd1bb r9ad289d  
    6666} istate_t;
    6767
     68#define RPL_USER        3
     69
    6870/** Return true if exception happened while in userspace */
    6971NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    7072{
    71         return !(istate->rip & UINT64_C(0x8000000000000000));
     73        return (istate->cs & RPL_USER) == RPL_USER;
    7274}
    7375
  • kernel/arch/ia32/include/istate.h

    r3acd1bb r9ad289d  
    6868} istate_t;
    6969
     70#define RPL_USER        3
     71
    7072/** Return true if exception happened while in userspace */
    7173NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    7274{
    73         return !(istate->eip & UINT32_C(0x80000000));
     75        return (istate->cs & RPL_USER) == RPL_USER;
    7476}
    7577
  • kernel/generic/src/main/kinit.c

    r3acd1bb r9ad289d  
    250250                                    CAP_IO_MANAGER | CAP_IRQ_REG);
    251251                               
    252                                 if (!ipc_phone_0)
     252                                if (!ipc_phone_0) {
    253253                                        ipc_phone_0 = &programs[i].task->answerbox;
     254                                        /*
     255                                         * Hold the first task so that the
     256                                         * ipc_phone_0 remains a valid pointer
     257                                         * even if the first task exits for
     258                                         * whatever reason.
     259                                         */
     260                                        task_hold(programs[i].task);
     261                                }
    254262                        }
    255263                       
  • kernel/generic/src/proc/task.c

    r3acd1bb r9ad289d  
    125125{
    126126        size_t tasks_left;
     127
     128        if (ipc_phone_0) {
     129                task_t *task_0 = ipc_phone_0->task;
     130                ipc_phone_0 = NULL;
     131                /*
     132                 * The first task is held by kinit(), we need to release it or
     133                 * it will never finish cleanup.
     134                 */
     135                task_release(task_0);
     136        }
    127137       
    128138        /* Repeat until there are any tasks except TASK */
Note: See TracChangeset for help on using the changeset viewer.