/kernel/liteos_a/testsuites/kernel/sample/posix/mutex/full/ |
D | It_posix_mutex_032.c | 53 pthread_mutexattr_t mutexAttr; in Testcase() local 57 err = pthread_mutexattr_init(&mutexAttr); in Testcase() 64 err = pthread_mutexattr_setprotocol(&mutexAttr, PTHREAD_PRIO_PROTECT); in Testcase() 68 err = pthread_mutex_init(&mutex, &mutexAttr); in Testcase() 75 err = pthread_mutexattr_destroy(&mutexAttr); in Testcase() 84 pthread_mutexattr_destroy(&mutexAttr); in Testcase()
|
D | It_posix_mutex_034.c | 56 pthread_mutexattr_t mutexAttr; in Testcase() local 60 err = pthread_mutexattr_init(&mutexAttr); in Testcase() 67 err = pthread_mutexattr_setprotocol(&mutexAttr, PTHREAD_PRIO_NONE); in Testcase() 71 err = pthread_mutex_init(&mutex, &mutexAttr); in Testcase() 78 err = pthread_mutexattr_destroy(&mutexAttr); in Testcase() 90 pthread_mutexattr_destroy(&mutexAttr); in Testcase()
|
D | It_posix_mutex_035.c | 56 pthread_mutexattr_t mutexAttr; in Testcase() local 60 err = pthread_mutexattr_init(&mutexAttr); in Testcase() 67 err = pthread_mutexattr_setprotocol(&mutexAttr, PTHREAD_PRIO_INHERIT); in Testcase() 71 err = pthread_mutex_init(&mutex, &mutexAttr); in Testcase() 78 err = pthread_mutexattr_destroy(&mutexAttr); in Testcase() 90 pthread_mutexattr_destroy(&mutexAttr); in Testcase()
|
D | It_posix_mutex_078.c | 43 pthread_mutexattr_t mutexAttr; in Testcase() local 46 pthread_mutexattr_init(&mutexAttr); in Testcase() 48 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in Testcase() 50 ret = pthread_mutex_init(&mutex, &mutexAttr); in Testcase()
|
D | It_posix_mutex_076.c | 60 pthread_mutexattr_t mutexAttr; in Testcase() local 63 pthread_mutexattr_init(&mutexAttr); in Testcase() 65 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in Testcase() 67 ret = pthread_mutex_init(&g_mutex1076, &mutexAttr); in Testcase()
|
D | It_posix_mutex_077.c | 65 pthread_mutexattr_t mutexAttr; in Testcase() local 76 pthread_mutexattr_init(&mutexAttr); in Testcase() 78 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in Testcase() 80 ret = pthread_mutex_init(&g_mutex077, &mutexAttr); in Testcase()
|
/kernel/liteos_m/kal/posix/src/ |
D | pthread_mutex.c | 71 int pthread_mutexattr_init(pthread_mutexattr_t *mutexAttr) in pthread_mutexattr_init() argument 73 if (mutexAttr == NULL) { in pthread_mutexattr_init() 77 mutexAttr->type = PTHREAD_MUTEX_DEFAULT; in pthread_mutexattr_init() 102 int pthread_mutexattr_settype(pthread_mutexattr_t *mutexAttr, int type) in pthread_mutexattr_settype() argument 104 if (mutexAttr == NULL) { in pthread_mutexattr_settype() 113 mutexAttr->type = (UINT8)((mutexAttr->type & ~MUTEXATTR_TYPE_MASK) | (UINT32)type); in pthread_mutexattr_settype() 118 int pthread_mutexattr_destroy(pthread_mutexattr_t *mutexAttr) in pthread_mutexattr_destroy() argument 120 if (mutexAttr == NULL) { in pthread_mutexattr_destroy() 124 (VOID)memset_s(mutexAttr, sizeof(pthread_mutexattr_t), 0, sizeof(pthread_mutexattr_t)); in pthread_mutexattr_destroy() 130 int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexAttr) in pthread_mutex_init() argument [all …]
|
/kernel/liteos_a/testsuites/unittest/process/lock/mutex/smoke/ |
D | pthread_mutex_test_016.cpp | 38 pthread_mutexattr_t mutexAttr; in TestCase() local 40 pthread_mutexattr_init(&mutexAttr); in TestCase() 41 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE); in TestCase() 42 ret = pthread_mutex_init(&mutex, &mutexAttr); in TestCase()
|
D | pthread_mutex_test_011.cpp | 37 pthread_mutexattr_t mutexAttr; in TestCase() local 40 pthread_mutexattr_init(&mutexAttr); in TestCase() 42 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in TestCase() 44 ret = pthread_mutex_init(&mutex, &mutexAttr); in TestCase()
|
D | pthread_mutex_test_013.cpp | 38 pthread_mutexattr_t mutexAttr; in TestCase() local 40 pthread_mutexattr_init(&mutexAttr); in TestCase() 41 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE); in TestCase() 43 ret = pthread_mutex_init(&mutex, &mutexAttr); in TestCase()
|
D | pthread_mutex_test_012.cpp | 38 pthread_mutexattr_t mutexAttr; in TestCase() local 40 pthread_mutexattr_init(&mutexAttr); in TestCase() 41 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in TestCase() 43 ret = pthread_mutex_init(&mutex, &mutexAttr); in TestCase()
|
D | pthread_mutex_test_015.cpp | 38 pthread_mutexattr_t mutexAttr; in TestCase() local 40 pthread_mutexattr_init(&mutexAttr); in TestCase() 41 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE); in TestCase() 43 ret = pthread_mutex_init(&mutex, &mutexAttr); in TestCase()
|
D | pthread_mutex_test_010.cpp | 54 pthread_mutexattr_t mutexAttr; in TestCase() local 59 pthread_mutexattr_init(&mutexAttr); in TestCase() 61 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in TestCase() 63 ret = pthread_mutex_init(&g_mutexLock001, &mutexAttr); in TestCase()
|
D | pthread_mutex_test_009.cpp | 59 pthread_mutexattr_t mutexAttr; in TestCase() local 64 pthread_mutexattr_init(&mutexAttr); in TestCase() 65 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in TestCase() 67 ret = pthread_mutex_init(&g_muxLock, &mutexAttr); in TestCase()
|
/kernel/liteos_m/testsuites/sample/posix/mutex/ |
D | It_posix_mutex_033.c | 36 pthread_mutexattr_t mutexAttr; in Testcase() local 39 pthread_mutexattr_init(&mutexAttr); in Testcase() 41 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in Testcase() 43 ret = pthread_mutex_init(&mutex, &mutexAttr); in Testcase()
|
D | It_posix_mutex_032.c | 53 pthread_mutexattr_t mutexAttr; in Testcase() local 56 pthread_mutexattr_init(&mutexAttr); in Testcase() 58 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in Testcase() 60 ret = pthread_mutex_init(&g_mutex1076, &mutexAttr); in Testcase()
|
D | It_posix_mutex_035.c | 58 pthread_mutexattr_t mutexAttr; in Testcase() local 69 pthread_mutexattr_init(&mutexAttr); in Testcase() 71 pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); in Testcase() 73 ret = pthread_mutex_init(&g_mutex077, &mutexAttr); in Testcase()
|
/kernel/liteos_a/compat/posix/src/ |
D | pthread_mutex.c | 99 int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexAttr) in pthread_mutex_init() argument 101 unsigned int ret = LOS_MuxInit(mutex, mutexAttr); in pthread_mutex_init() 102 if ((ret == LOS_OK) && (mutexAttr == NULL)) { in pthread_mutex_init()
|
/kernel/liteos_m/testsuites/sample/posix/ |
D | pthread_func_test.c | 943 pthread_mutexattr_t mutexAttr; variable 946 pthread_mutexattr_init(&mutexAttr); 950 ret = pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); 952 ret = pthread_mutexattr_gettype(&mutexAttr, &mutexType); 959 mutexAttr.type = 3; /* 3: Invalid type */ 960 ret = pthread_mutexattr_gettype(&mutexAttr, &mutexType);
|