Changeset d50f3e5 in mainline for uspace/lib/posix/test/pthread/keys.c
- Timestamp:
- 2025-03-09T20:06:24Z (15 hours ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/test/pthread/keys.c
raf28af6 rd50f3e5 36 36 37 37 pthread_key_t key; 38 int destructors_executed;39 40 static void destructor(void *_data)41 {42 destructors_executed++;43 }44 38 45 39 static errno_t simple_fibril(void *_arg) … … 57 51 PCUT_TEST(pthread_keys_basic) 58 52 { 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)); 61 54 PCUT_ASSERT_PTR_EQUALS(NULL, pthread_getspecific(key)); 62 55 … … 71 64 } 72 65 73 PCUT_ASSERT_INT_EQUALS(0, destructors_executed);74 66 PCUT_ASSERT_PTR_EQUALS((void *) 0x42, pthread_getspecific(key)); 75 67 … … 78 70 } 79 71 80 PCUT_ASSERT_INT_EQUALS(1, destructors_executed);81 72 PCUT_ASSERT_PTR_EQUALS((void *) 0x42, pthread_getspecific(key)); 82 73 }
Note:
See TracChangeset
for help on using the changeset viewer.