Changeset 12824b9 in mainline


Ignore:
Timestamp:
2025-03-11T10:24:56Z (29 hours ago)
Author:
Matěj Volf <git@…>
Parents:
98743e2
git-author:
Matěj Volf <git@…> (2025-03-11 10:22:37)
git-committer:
Matěj Volf <git@…> (2025-03-11 10:24:56)
Message:

remove unnecessary changes

Location:
uspace/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/libc.c

    r98743e2 r12824b9  
    8181                main_fibril.tcb = tls_make_initial(__progsymbols.elfstart);
    8282        }
    83         main_fibril.is_freeable = false;
    8483
    8584        assert(main_fibril.tcb);
  • uspace/lib/posix/meson.build

    r98743e2 r12824b9  
    3030includes += include_directories('include/posix', 'include')
    3131c_args += [ '-fno-builtin', '-D_XOPEN_SOURCE' ]
    32 allow_shared = true
    3332
    3433# TODO
  • uspace/lib/posix/src/pthread/keys.c

    r98743e2 r12824b9  
    4343#define DPRINTF(format, ...) ((void) 0);
    4444
    45 static fibril_local bool fibril_initialized = false;
    4645static atomic_ushort next_key = 1; // skip the key 'zero'
    4746
     
    5756void *pthread_getspecific(pthread_key_t key)
    5857{
    59         // initialization is done in setspecific -> if not initialized, nothing was set yet
    60         if (!fibril_initialized) {
    61                 DPRINTF("pthread_getspecific(%d) = NULL (uninitialized)\n", key);
    62                 return NULL;
    63         }
    64 
    6558        assert(key < PTHREAD_KEYS_MAX);
    6659        assert(key < next_key);
     
    7467{
    7568        DPRINTF("pthread_setspecific(%d, %p)\n", key, data);
    76         if (!fibril_initialized) {
    77                 DPRINTF("initializing pthread keys\n");
    78                 for (unsigned i = 0; i < PTHREAD_KEYS_MAX; i++) {
    79                         key_data[i] = NULL;
    80                 }
    81                 fibril_initialized = true;
    82         }
    8369        assert(key < PTHREAD_KEYS_MAX);
    8470        assert(key < next_key);
     
    9177int pthread_key_delete(pthread_key_t key)
    9278{
    93         // see https://github.com/HelenOS/helenos/pull/245#issuecomment-2706795848
     79        /* see https://github.com/HelenOS/helenos/pull/245#issuecomment-2706795848 */
    9480        not_implemented();
    9581        return EOK;
     
    10591        }
    10692        if (destructor != NULL) {
    107                 static int __counter = 0;
    108                 if (__counter == 0) {
     93                /* Inlined not_implemented() macro to add custom message */
     94                static int __not_implemented_counter = 0;
     95                if (__not_implemented_counter == 0) {
    10996                        fprintf(stderr, "pthread_key_create: destructors not supported\n");
    11097                }
    111                 __counter++;
     98                __not_implemented_counter++;
    11299        }
    113100
Note: See TracChangeset for help on using the changeset viewer.