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

Changeset ca21f1e2 in mainline


Ignore:
Timestamp:
2018-11-22T17:09:51Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
3612e9f, 392f0e7, 3aa24ae8, d708088
Parents:
21d3201
git-author:
Jakub Jermar <jakub@…> (2018-11-22 17:09:47)
git-committer:
Jakub Jermar <jakub@…> (2018-11-22 17:09:51)
Message:

Provide only one way to destroy address spaces

Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/as.h

    r21d3201 rca21f1e2  
    268268
    269269extern as_t *as_create(unsigned int);
    270 extern void as_destroy(as_t *);
    271270extern void as_hold(as_t *);
    272271extern void as_release(as_t *);
  • kernel/generic/src/mm/as.c

    r21d3201 rca21f1e2  
    187187 *
    188188 */
    189 void as_destroy(as_t *as)
     189static void as_destroy(as_t *as)
    190190{
    191191        DEADLOCK_PROBE_INIT(p_asidlock);
  • kernel/generic/src/proc/program.c

    r21d3201 rca21f1e2  
    150150        prg->loader_status = elf_load((elf_header_t *) image_addr, as);
    151151        if (prg->loader_status != EE_OK) {
    152                 as_destroy(as);
     152                as_release(as);
    153153                prg->task = NULL;
    154154                prg->main_thread = NULL;
     
    176176        void *loader = program_loader;
    177177        if (!loader) {
    178                 as_destroy(as);
     178                as_release(as);
    179179                log(LF_OTHER, LVL_ERROR,
    180180                    "Cannot spawn loader as none was registered");
     
    184184        prg->loader_status = elf_load((elf_header_t *) program_loader, as);
    185185        if (prg->loader_status != EE_OK) {
    186                 as_destroy(as);
     186                as_release(as);
    187187                log(LF_OTHER, LVL_ERROR, "Cannot spawn loader (%s)",
    188188                    elf_error(prg->loader_status));
Note: See TracChangeset for help on using the changeset viewer.