Ignore:
Timestamp:
2018-07-18T19:42:28Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9bde0d5
Parents:
0b05082
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 19:05:08)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-18 19:42:28)
Message:

Make sure that a thread with uninitialized TLS does not need to call malloc()
to initialize it.

For threads and tasks created by loader, we create TLS beforehand and pass
it to the child. For tasks spawned directly by the kernel, we require it is
a static executable and allocate the initial TLS using as_area_create() instead
of the libc allocator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/private/fibril.h

    r0b05082 r40abf56  
    5555        atomic_t futex_locks;
    5656        bool is_writer : 1;
     57        /* In some places, we use fibril structs that can't be freed. */
     58        bool is_freeable : 1;
    5759};
    5860
     
    6466} fibril_switch_type_t;
    6567
    66 extern fibril_t *fibril_setup(void);
     68extern fibril_t *fibril_alloc(void);
     69extern void fibril_setup(fibril_t *);
    6770extern void fibril_teardown(fibril_t *f, bool locked);
    6871extern int fibril_switch(fibril_switch_type_t stype);
Note: See TracChangeset for help on using the changeset viewer.