Changeset d50f3e5 in mainline for uspace/lib/posix/test/pthread/keys.c


Ignore:
Timestamp:
2025-03-09T20:06:24Z (15 hours ago)
Author:
Matěj Volf <git@…>
Children:
53e652d
Parents:
af28af6
git-author:
Matěj Volf <git@…> (2025-03-09 20:05:51)
git-committer:
Matěj Volf <git@…> (2025-03-09 20:06:24)
Message:

decrease scrope of pthread keys support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/test/pthread/keys.c

    raf28af6 rd50f3e5  
    3636
    3737pthread_key_t key;
    38 int destructors_executed;
    39 
    40 static void destructor(void *_data)
    41 {
    42         destructors_executed++;
    43 }
    4438
    4539static errno_t simple_fibril(void *_arg)
     
    5751PCUT_TEST(pthread_keys_basic)
    5852{
    59         destructors_executed = 0;
    60         PCUT_ASSERT_INT_EQUALS(0, pthread_key_create(&key, destructor));
     53        PCUT_ASSERT_INT_EQUALS(0, pthread_key_create(&key, NULL));
    6154        PCUT_ASSERT_PTR_EQUALS(NULL, pthread_getspecific(key));
    6255
     
    7164        }
    7265
    73         PCUT_ASSERT_INT_EQUALS(0, destructors_executed);
    7466        PCUT_ASSERT_PTR_EQUALS((void *) 0x42, pthread_getspecific(key));
    7567
     
    7870        }
    7971
    80         PCUT_ASSERT_INT_EQUALS(1, destructors_executed);
    8172        PCUT_ASSERT_PTR_EQUALS((void *) 0x42, pthread_getspecific(key));
    8273}
Note: See TracChangeset for help on using the changeset viewer.