Changeset 6eef3c4 in mainline for kernel/arch/sparc64/src


Ignore:
Timestamp:
2012-06-20T16:18:37Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8b36bf2, f22dc820
Parents:
abfc9f3
Message:

cleanup thread_create() and thread_t structure

  • remove 'flag' bitfield from thread_t, use individual boolean flags (can be optimized later on by adding : 1)
  • use an enum for call flags, add THREAD_FLAG_NONE
  • remove the 'uncounted' argument in favour of a call flag
  • introduce thread_wire() to setup wired threads
Location:
kernel/arch/sparc64/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/niagara.c

    rabfc9f3 r6eef3c4  
    184184       
    185185        instance = malloc(sizeof(niagara_instance_t), FRAME_ATOMIC);
    186         instance->thread = thread_create(kniagarapoll, NULL, TASK, 0,
    187             "kniagarapoll", true);
     186        instance->thread = thread_create(kniagarapoll, NULL, TASK,
     187            THREAD_FLAG_UNCOUNTED, "kniagarapoll");
    188188       
    189189        if (!instance->thread) {
  • kernel/arch/sparc64/src/proc/sun4u/scheduler.c

    rabfc9f3 r6eef3c4  
    5151void before_thread_runs_arch(void)
    5252{
    53         if ((THREAD->flags & THREAD_FLAG_USPACE)) {
     53        if (THREAD->uspace) {
    5454                /*
    5555                 * Write kernel stack address to %g6 of the alternate and
     
    7474void after_thread_ran_arch(void)
    7575{
    76         if ((THREAD->flags & THREAD_FLAG_USPACE)) {
    77                 /* sample the state of the userspace window buffer */   
     76        if (THREAD->uspace) {
     77                /* sample the state of the userspace window buffer */
    7878                THREAD->arch.uspace_window_buffer = (uint8_t *) read_from_ag_g7();
    7979        }
  • kernel/arch/sparc64/src/proc/sun4v/scheduler.c

    rabfc9f3 r6eef3c4  
    5454void before_thread_runs_arch(void)
    5555{
    56         if ((THREAD->flags & THREAD_FLAG_USPACE)) {
     56        if (THREAD->uspace) {
    5757                uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE -
    5858                    (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT));
     
    6666void after_thread_ran_arch(void)
    6767{
    68         if ((THREAD->flags & THREAD_FLAG_USPACE)) {
    69                 /* sample the state of the userspace window buffer */   
     68        if (THREAD->uspace) {
     69                /* sample the state of the userspace window buffer */
    7070                THREAD->arch.uspace_window_buffer =
    7171                    (uint8_t *) asi_u64_read(ASI_SCRATCHPAD, SCRATCHPAD_WBUF);
  • kernel/arch/sparc64/src/proc/thread.c

    rabfc9f3 r6eef3c4  
    6161void thread_create_arch(thread_t *t)
    6262{
    63         if ((t->flags & THREAD_FLAG_USPACE) && (!t->arch.uspace_window_buffer))
     63        if ((t->uspace) && (!t->arch.uspace_window_buffer))
    6464                {
    6565                /*
Note: See TracChangeset for help on using the changeset viewer.