Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: userspace: dynamic thread stack support #59773

Merged
merged 6 commits into from
Jul 17, 2023

Commits on Jul 14, 2023

  1. tests: kernel: threads: stack: Enable USERSPACE

    Test that automatic thread stack allocation works for
    both user and kernel threads.
    
    Signed-off-by: Flavio Ceolin <[email protected]>
    Flavio Ceolin committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    e62a187 View commit details
    Browse the repository at this point in the history
  2. kernel: userspace: Add k_object_alloc_size

    Add a new API to dynamically allocate kernel objects that allow
    passing an arbitrary size. This new API allows to allocate dynamic
    thread stack.
    
    Signed-off-by: Flavio Ceolin <[email protected]>
    Flavio Ceolin committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    cc52930 View commit details
    Browse the repository at this point in the history
  3. kernel: dynamic: Support usermode thread stack

    Allocate kernel object for userspace thread stack.
    
    Signed-off-by: Flavio Ceolin <[email protected]>
    Flavio Ceolin committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    d9b5b5b View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. kernel: userspace: Dynamic thread stack object

    Add support for dynamic thread stack objects. A new container
    for this kernel object was added to avoid its alignment constraint
    to all dynamic objects.
    
    Signed-off-by: Flavio Ceolin <[email protected]>
    Flavio Ceolin committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    4260a7d View commit details
    Browse the repository at this point in the history
  2. kernel: dynamic: Fix stack allocation logic

    Fix the preference allocation logic. If pool is preferred but POOL_SIZE
    is 0 or pool allocation fails, it fallbacks to heap allocation if it
    is enabled.
    
    Signed-off-by: Flavio Ceolin <[email protected]>
    Flavio Ceolin committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    dddf77e View commit details
    Browse the repository at this point in the history
  3. kernel: userspace: Use only list for dynamic objs

    Since the rbtree is using as list because we no longer
    can assume that the object pointer is the address of the
    data field in the dynamic object struct, lets just use
    the already existent dlist for tracking dynamic kernel
    objects.
    
    Signed-off-by: Flavio Ceolin <[email protected]>
    Flavio Ceolin committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    0311f34 View commit details
    Browse the repository at this point in the history