Changeset 8565a42 in mainline for kernel/generic/src/proc/program.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/program.c

    r3061bc1 r8565a42  
    7575        if (!prg->task)
    7676                return ELIMIT;
    77        
     77
    7878        /*
    7979         * Create the stack address space area.
     
    9494                return ENOMEM;
    9595        }
    96        
     96
    9797        uspace_arg_t *kernel_uarg = (uspace_arg_t *)
    9898            malloc(sizeof(uspace_arg_t), 0);
    99        
     99
    100100        kernel_uarg->uspace_entry = (void *) entry_addr;
    101101        kernel_uarg->uspace_stack = (void *) virt;
     
    104104        kernel_uarg->uspace_thread_arg = NULL;
    105105        kernel_uarg->uspace_uarg = NULL;
    106        
     106
    107107        /*
    108108         * Create the main thread.
     
    117117                return ELIMIT;
    118118        }
    119        
     119
    120120        return EOK;
    121121}
     
    142142        if (!as)
    143143                return ENOMEM;
    144        
     144
    145145        prg->loader_status = elf_load((elf_header_t *) image_addr, as, 0);
    146146        if (prg->loader_status != EE_OK) {
     
    148148                prg->task = NULL;
    149149                prg->main_thread = NULL;
    150                
     150
    151151                if (prg->loader_status != EE_LOADER)
    152152                        return ENOTSUP;
    153                
     153
    154154                /* Register image as the program loader */
    155155                if (program_loader != NULL)
    156156                        return ELIMIT;
    157                
     157
    158158                program_loader = image_addr;
    159159                log(LF_OTHER, LVL_NOTE, "Program loader at %p", (void *) image_addr);
    160                
     160
    161161                return EOK;
    162162        }
    163        
     163
    164164        return program_create(as, ((elf_header_t *) image_addr)->e_entry,
    165165            name, prg);
     
    179179        if (!as)
    180180                return ENOMEM;
    181        
     181
    182182        void *loader = program_loader;
    183183        if (!loader) {
     
    187187                return ENOENT;
    188188        }
    189        
     189
    190190        prg->loader_status = elf_load((elf_header_t *) program_loader, as,
    191191            ELD_F_LOADER);
     
    196196                return ENOENT;
    197197        }
    198        
     198
    199199        return program_create(as, ((elf_header_t *) program_loader)->e_entry,
    200200            name, prg);
     
    230230        if (name_len > TASK_NAME_BUFLEN - 1)
    231231                name_len = TASK_NAME_BUFLEN - 1;
    232        
     232
    233233        char namebuf[TASK_NAME_BUFLEN];
    234234        errno_t rc = copy_from_uspace(namebuf, uspace_name, name_len);
    235235        if (rc != EOK)
    236236                return (sys_errno_t) rc;
    237        
     237
    238238        namebuf[name_len] = 0;
    239        
     239
    240240        /* Spawn the new task. */
    241241        program_t prg;
     
    243243        if (rc != EOK)
    244244                return rc;
    245        
     245
    246246        // FIXME: control the permissions
    247247        perm_set(prg.task, perm_get(TASK));
    248248        program_ready(&prg);
    249        
     249
    250250        return EOK;
    251251}
Note: See TracChangeset for help on using the changeset viewer.