Changeset abf6c01 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2018-11-09T22:03:24Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
436a0a5
Parents:
ba9a150
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 17:00:46)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
Message:

Add FRAME_ATOMIC to some allocations

File:
1 edited

Legend:

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

    rba9a150 rabf6c01  
    165165
    166166#ifdef CONFIG_FPU
    167         thread->saved_fpu_context = slab_alloc(fpu_context_cache, kmflags);
     167        thread->saved_fpu_context = slab_alloc(fpu_context_cache,
     168            FRAME_ATOMIC | kmflags);
    168169        if (!thread->saved_fpu_context)
    169170                return ENOMEM;
     
    338339    thread_flags_t flags, const char *name)
    339340{
    340         thread_t *thread = (thread_t *) slab_alloc(thread_cache, 0);
     341        thread_t *thread = (thread_t *) slab_alloc(thread_cache, FRAME_ATOMIC);
    341342        if (!thread)
    342343                return NULL;
     
    652653
    653654        return waitq_sleep_timeout(&thread->join_wq, usec, flags, NULL);
     655
     656        // FIXME: join should deallocate the thread.
     657        //        Current code calls detach after join, that's contrary to how
     658        //        join is used in other threading APIs.
    654659}
    655660
Note: See TracChangeset for help on using the changeset viewer.