/Zephyr-Core-3.7.0/tests/posix/common/src/ |
D | mutex_attr.c | 14 pthread_mutexattr_t attr; in ZTEST() local 21 zassert_ok(pthread_mutexattr_init(&attr)); in ZTEST() 22 zassert_ok(pthread_mutexattr_destroy(&attr)); in ZTEST() 27 pthread_mutexattr_t attr; in ZTEST() local 33 zassert_equal(EINVAL, pthread_mutexattr_destroy(&attr)); in ZTEST() 38 zassert_ok(pthread_mutexattr_init(&attr)); in ZTEST() 39 zassert_ok(pthread_mutexattr_destroy(&attr)); in ZTEST() 42 zassert_equal(EINVAL, pthread_mutexattr_destroy(&attr)); in ZTEST() 49 pthread_mutexattr_t attr; in ZTEST() local 55 zassert_equal(EINVAL, pthread_mutexattr_gettype(&attr, &type)); in ZTEST() [all …]
|
D | pthread_attr.c | 17 static pthread_attr_t attr; variable 120 zassert_ok(pthread_attr_init(&attr)); in ZTEST() 126 can_create_thread(&attr); in ZTEST() 129 zassert_ok(pthread_attr_destroy(&attr), "failed to destroy an initialized attr"); in ZTEST() 132 cannot_create_thread(&attr); in ZTEST() 136 zassert_ok(pthread_attr_destroy(&attr)); in ZTEST() 140 zassert_ok(pthread_attr_init(&attr)); in ZTEST() 142 zassert_ok(pthread_attr_setstack(&attr, &static_thread_stack, STATIC_THREAD_STACK_SIZE)); in ZTEST() 145 can_create_thread(&attr); in ZTEST() 162 zassert_equal(pthread_attr_getguardsize(&attr, NULL), EINVAL); in ZTEST() [all …]
|
D | barrier.c | 16 pthread_barrierattr_t attr; in ZTEST() local 18 ret = pthread_barrierattr_init(&attr); in ZTEST() 21 ret = pthread_barrierattr_getpshared(&attr, &pshared); in ZTEST() 25 ret = pthread_barrierattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE); in ZTEST() 28 ret = pthread_barrierattr_setpshared(&attr, PTHREAD_PROCESS_PUBLIC); in ZTEST() 31 ret = pthread_barrierattr_getpshared(&attr, &pshared); in ZTEST() 34 ret = pthread_barrierattr_setpshared(&attr, 42); in ZTEST() 37 ret = pthread_barrierattr_destroy(&attr); in ZTEST()
|
/Zephyr-Core-3.7.0/lib/heap/ |
D | shared_multi_heap.c | 24 enum shared_multi_heap_attr attr; in smh_choice() local 27 attr = (enum shared_multi_heap_attr)(long) cfg; in smh_choice() 29 if (attr >= MAX_SHARED_MULTI_HEAP_ATTR || size == 0) { in smh_choice() 36 for (size_t hdx = 0; hdx < smh_data[attr].heap_cnt; hdx++) { in smh_choice() 37 h = &smh_data[attr].heap_pool[hdx]; in smh_choice() 54 enum shared_multi_heap_attr attr; in shared_multi_heap_add() local 58 attr = region->attr; in shared_multi_heap_add() 60 if (attr >= MAX_SHARED_MULTI_HEAP_ATTR) { in shared_multi_heap_add() 65 if (smh_data[attr].heap_cnt >= MAX_MULTI_HEAPS) { in shared_multi_heap_add() 69 slot = smh_data[attr].heap_cnt; in shared_multi_heap_add() [all …]
|
/Zephyr-Core-3.7.0/lib/posix/options/ |
D | pthread.c | 44 static inline size_t __get_attr_stacksize(const struct posix_thread_attr *attr) in __get_attr_stacksize() argument 46 return attr->stacksize + 1; in __get_attr_stacksize() 49 static inline void __set_attr_stacksize(struct posix_thread_attr *attr, size_t stacksize) in __set_attr_stacksize() argument 51 attr->stacksize = stacksize - 1; in __set_attr_stacksize() 165 t->attr.detachstate == PTHREAD_CREATE_DETACHED)); in to_posix_thread() 275 static bool __attr_is_runnable(const struct posix_thread_attr *attr) in __attr_is_runnable() argument 279 if (attr == NULL || attr->stack == NULL) { in __attr_is_runnable() 280 LOG_DBG("attr %p is not initialized", attr); in __attr_is_runnable() 284 stacksize = __get_attr_stacksize(attr); in __attr_is_runnable() 286 LOG_DBG("attr %p has stacksize %zu is smaller than PTHREAD_STACK_MIN (%zu)", attr, in __attr_is_runnable() [all …]
|
/Zephyr-Core-3.7.0/tests/bluetooth/gatt/src/ |
D | main.c | 37 static void test1_ccc_cfg_changed(const struct bt_gatt_attr *attr, uint16_t value) in test1_ccc_cfg_changed() argument 42 static ssize_t read_test(struct bt_conn *conn, const struct bt_gatt_attr *attr, in read_test() argument 45 const char *value = attr->user_data; in read_test() 47 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_test() 51 static ssize_t write_test(struct bt_conn *conn, const struct bt_gatt_attr *attr, in write_test() argument 55 uint8_t *value = attr->user_data; in write_test() 145 static uint8_t count_attr(const struct bt_gatt_attr *attr, uint16_t handle, in count_attr() argument 155 static uint8_t find_attr(const struct bt_gatt_attr *attr, uint16_t handle, in find_attr() argument 160 *tmp = attr; in find_attr() 167 const struct bt_gatt_attr *attr; in ZTEST() local [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/ll/edtt/gatt_test_app/src/gatt/ |
D | service_c_2_1.c | 167 const struct bt_gatt_attr *attr, void *buf, in read_value_v10() argument 170 const uint8_t *value = attr->user_data; in read_value_v10() 172 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v10() 189 const struct bt_gatt_attr *attr, void *buf, in read_str_value() argument 192 const char *value = attr->user_data; in read_str_value() 194 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 212 const struct bt_gatt_attr *attr, const void *buf, in write_value_v2() argument 215 char *value = attr->user_data; in write_value_v2() 240 const struct bt_gatt_attr *attr, void *buf, in read_long_des_v2d1() argument 243 const uint8_t *value = attr->user_data; in read_long_des_v2d1() [all …]
|
D | service_b_1_1.c | 70 const struct bt_gatt_attr *attr, void *buf, in read_value_v4() argument 73 const uint8_t *value = attr->user_data; in read_value_v4() 75 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v4() 93 const struct bt_gatt_attr *attr, const void *buf, in write_value_v4() argument 96 uint8_t *value = attr->user_data; in write_value_v4() 121 const struct bt_gatt_attr *attr, void *buf, in read_value_v4_1() argument 124 const uint8_t *value = attr->user_data; in read_value_v4_1() 126 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v4_1() 144 const struct bt_gatt_attr *attr, in write_value_v4_1() argument 148 uint8_t *value = attr->user_data; in write_value_v4_1() [all …]
|
D | service_b_5_1.c | 63 const struct bt_gatt_attr *attr, void *buf, in read_value_v8() argument 66 const uint8_t *value = attr->user_data; in read_value_v8() 68 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v8() 86 const struct bt_gatt_attr *attr, const void *buf, in write_value_v8() argument 89 uint8_t *value = attr->user_data; in write_value_v8() 114 const struct bt_gatt_attr *attr, void *buf, in read_des_v8d1() argument 117 const uint8_t *value = attr->user_data; in read_des_v8d1() 119 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v8d1() 137 const struct bt_gatt_attr *attr, const void *buf, in write_des_v8d1() argument 140 uint8_t *value = attr->user_data; in write_des_v8d1() [all …]
|
D | service_f_1.c | 102 const struct bt_gatt_attr *attr, void *buf, in read_str_value() argument 105 const char *value = attr->user_data; in read_str_value() 107 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 124 const struct bt_gatt_attr *attr, void *buf, in read_value_v15() argument 127 const uint8_t *value = attr->user_data; in read_value_v15() 129 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v15() 147 const struct bt_gatt_attr *attr, const void *buf, in write_value_v15() argument 150 uint8_t *value = attr->user_data; in write_value_v15() 175 const struct bt_gatt_attr *attr, void *buf, in read_value_v6() argument 178 const uint16_t *value = attr->user_data; in read_value_v6() [all …]
|
D | service_c_2_2.c | 81 const struct bt_gatt_attr *attr, void *buf, in read_value_v10() argument 84 const uint8_t *value = attr->user_data; in read_value_v10() 86 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v10() 103 const struct bt_gatt_attr *attr, void *buf, in read_str_value() argument 106 const char *value = attr->user_data; in read_str_value() 108 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 126 const struct bt_gatt_attr *attr, const void *buf, in write_value_v2() argument 129 char *value = attr->user_data; in write_value_v2() 155 const struct bt_gatt_attr *attr, in write_value_v2_1() argument 159 char *value = attr->user_data; in write_value_v2_1() [all …]
|
D | service_c_2_3.c | 81 const struct bt_gatt_attr *attr, void *buf, in read_value_v10() argument 84 const uint8_t *value = attr->user_data; in read_value_v10() 86 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v10() 103 const struct bt_gatt_attr *attr, void *buf, in read_str_value() argument 106 const char *value = attr->user_data; in read_str_value() 108 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_str_value() 126 const struct bt_gatt_attr *attr, const void *buf, in write_value_v2() argument 129 char *value = attr->user_data; in write_value_v2() 155 const struct bt_gatt_attr *attr, in write_value_v2_1() argument 159 char *value = attr->user_data; in write_value_v2_1() [all …]
|
D | service_c_1_3.c | 65 const struct bt_gatt_attr *attr, in read_value_v9__128_bit_uuid() argument 68 const uint8_t *value = attr->user_data; in read_value_v9__128_bit_uuid() 70 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_value_v9__128_bit_uuid() 88 const struct bt_gatt_attr *attr, in write_value_v9__128_bit_uuid() argument 92 uint8_t *value = attr->user_data; in write_value_v9__128_bit_uuid() 118 const struct bt_gatt_attr *attr, in read_des_v9d2__128_bit_uuid() argument 121 const uint8_t *value = attr->user_data; in read_des_v9d2__128_bit_uuid() 123 return bt_gatt_attr_read(conn, attr, buf, len, offset, value, in read_des_v9d2__128_bit_uuid() 142 const struct bt_gatt_attr *attr, in write_des_v9d2__128_bit_uuid() argument 146 uint8_t *value = attr->user_data; in write_des_v9d2__128_bit_uuid() [all …]
|
/Zephyr-Core-3.7.0/include/zephyr/posix/ |
D | pthread.h | 237 int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol); 244 int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); 251 int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, 259 int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type); 268 int pthread_mutexattr_init(pthread_mutexattr_t *attr); 277 int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); 299 int pthread_barrier_init(pthread_barrier_t *b, const pthread_barrierattr_t *attr, 328 int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared); 335 int pthread_barrierattr_getpshared(const pthread_barrierattr_t *ZRESTRICT attr, 385 int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr); [all …]
|
/Zephyr-Core-3.7.0/samples/sensor/mcux_lpcmp/src/ |
D | main.c | 15 int16_t attr; member 20 {.attr = SENSOR_ATTR_MCUX_LPCMP_POSITIVE_MUX_INPUT, .val = 0}, 21 {.attr = SENSOR_ATTR_MCUX_LPCMP_NEGATIVE_MUX_INPUT, .val = 7}, 23 {.attr = SENSOR_ATTR_MCUX_LPCMP_DAC_ENABLE, .val = 1}, 24 {.attr = SENSOR_ATTR_MCUX_LPCMP_DAC_HIGH_POWER_MODE_ENABLE, .val = 0}, 25 {.attr = SENSOR_ATTR_MCUX_LPCMP_DAC_REFERENCE_VOLTAGE_SOURCE, .val = 0}, 26 {.attr = SENSOR_ATTR_MCUX_LPCMP_DAC_OUTPUT_VOLTAGE, .val = (0xFF >> 1)}, 28 {.attr = SENSOR_ATTR_MCUX_LPCMP_SAMPLE_ENABLE, .val = 0}, 29 {.attr = SENSOR_ATTR_MCUX_LPCMP_FILTER_COUNT, .val = 7}, 30 {.attr = SENSOR_ATTR_MCUX_LPCMP_FILTER_PERIOD, .val = (0xFF >> 1)}, [all …]
|
/Zephyr-Core-3.7.0/tests/subsys/mem_mgmt/mem_attr/ |
D | app.overlay | 6 #include <zephyr/dt-bindings/memory-attr/memory-attr.h> 7 #include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h> 11 compatible = "vnd,memory-attr"; 13 zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_FLASH) | DT_MEM_NON_VOLATILE )>; 17 compatible = "vnd,memory-attr"; 19 zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>; 23 compatible = "vnd,memory-attr"; 25 zephyr,memory-attr = <( DT_MEM_CACHEABLE | DT_MEM_OOO )>;
|
/Zephyr-Core-3.7.0/tests/bluetooth/audio/ascs/src/ |
D | test_common.c | 53 static uint8_t attr_found(const struct bt_gatt_attr *attr, uint16_t handle, void *user_data) in attr_found() argument 57 *result = attr; in attr_found() 76 static const struct bt_gatt_attr *attr; in test_ase_control_point_get() local 78 if (attr == NULL) { in test_ase_control_point_get() 81 BT_UUID_ASCS_ASE_CP, NULL, 1, attr_found, &attr); in test_ase_control_point_get() 84 zassert_not_null(attr, "ASE Control Point not found"); in test_ase_control_point_get() 86 return attr; in test_ase_control_point_get() 92 const struct bt_gatt_attr *attr = NULL; in test_ase_get() local 99 const struct bt_gatt_attr *prev = attr; in test_ase_get() 103 uuid, NULL, i + 1, attr_found, &attr); in test_ase_get() [all …]
|
/Zephyr-Core-3.7.0/subsys/bluetooth/audio/ |
D | ccid.c | 36 const struct bt_gatt_attr *attr; member 40 static uint8_t ccid_attr_cb(const struct bt_gatt_attr *attr, uint16_t handle, void *user_data) in ccid_attr_cb() argument 44 if (attr->read != NULL) { in ccid_attr_cb() 48 res = attr->read(NULL, attr, &ccid, sizeof(ccid), 0); in ccid_attr_cb() 51 search_param->attr = attr; in ccid_attr_cb() 63 .attr = NULL, in bt_ccid_find_attr() 70 return search_param.attr; in bt_ccid_find_attr()
|
/Zephyr-Core-3.7.0/subsys/mem_mgmt/ |
D | mem_attr_heap.c | 17 uint32_t attr; member 28 uint32_t attr; in mah_choice() local 35 attr = (uint32_t)(long) cfg; in mah_choice() 45 if (h->attr != attr) { in mah_choice() 63 void *mem_attr_heap_alloc(uint32_t attr, size_t bytes) in mem_attr_heap_alloc() argument 66 (void *)(long) attr, bytes); in mem_attr_heap_alloc() 69 void *mem_attr_heap_aligned_alloc(uint32_t attr, size_t align, size_t bytes) in mem_attr_heap_aligned_alloc() argument 72 (void *)(long) attr, align, bytes); in mem_attr_heap_aligned_alloc() 84 static int ma_heap_add(const struct mem_attr_region_t *region, uint32_t attr) in ma_heap_add() argument 97 mh->attr = attr; in ma_heap_add()
|
/Zephyr-Core-3.7.0/samples/sensor/bmg160/src/ |
D | main.c | 92 struct sensor_value attr; in test_trigger_mode() local 103 sensor_degrees_to_rad(10, &attr); /* convert to rad/s */ in test_trigger_mode() 106 SENSOR_ATTR_SLOPE_TH, &attr) < 0) { in test_trigger_mode() 112 attr.val1 = 4; in test_trigger_mode() 113 attr.val2 = 0; in test_trigger_mode() 116 SENSOR_ATTR_SLOPE_DUR, &attr) < 0) { in test_trigger_mode() 141 attr.val1 = 100; in test_trigger_mode() 142 attr.val2 = 0; in test_trigger_mode() 145 SENSOR_ATTR_SAMPLING_FREQUENCY, &attr) < 0) { in test_trigger_mode() 177 struct sensor_value attr; in main() local [all …]
|
/Zephyr-Core-3.7.0/subsys/bluetooth/host/ |
D | crypto_psa.c | 61 psa_key_attributes_t attr = PSA_KEY_ATTRIBUTES_INIT; in bt_encrypt_le() local 76 psa_set_key_type(&attr, PSA_KEY_TYPE_AES); in bt_encrypt_le() 77 psa_set_key_bits(&attr, 128); in bt_encrypt_le() 78 psa_set_key_usage_flags(&attr, PSA_KEY_USAGE_ENCRYPT); in bt_encrypt_le() 79 psa_set_key_algorithm(&attr, PSA_ALG_ECB_NO_PADDING); in bt_encrypt_le() 80 if (psa_import_key(&attr, tmp, 16, &key_id) != PSA_SUCCESS) { in bt_encrypt_le() 112 psa_key_attributes_t attr = PSA_KEY_ATTRIBUTES_INIT; in bt_encrypt_be() local 124 psa_set_key_type(&attr, PSA_KEY_TYPE_AES); in bt_encrypt_be() 125 psa_set_key_bits(&attr, 128); in bt_encrypt_be() 126 psa_set_key_usage_flags(&attr, PSA_KEY_USAGE_ENCRYPT); in bt_encrypt_be() [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/audio/src/ |
D | pacs_notify_server_test.c | 50 struct bt_gatt_attr *attr; in is_peer_subscribed() local 53 attr = bt_gatt_find_by_uuid(NULL, 0, BT_UUID_PACS_SNK); in is_peer_subscribed() 54 if (!attr) { in is_peer_subscribed() 57 if (bt_gatt_is_subscribed(conn, attr, BT_GATT_CCC_NOTIFY)) { in is_peer_subscribed() 61 attr = bt_gatt_find_by_uuid(NULL, 0, BT_UUID_PACS_SNK_LOC); in is_peer_subscribed() 62 if (!attr) { in is_peer_subscribed() 65 if (bt_gatt_is_subscribed(conn, attr, BT_GATT_CCC_NOTIFY)) { in is_peer_subscribed() 69 attr = bt_gatt_find_by_uuid(NULL, 0, BT_UUID_PACS_SRC); in is_peer_subscribed() 70 if (!attr) { in is_peer_subscribed() 73 if (bt_gatt_is_subscribed(conn, attr, BT_GATT_CCC_NOTIFY)) { in is_peer_subscribed() [all …]
|
/Zephyr-Core-3.7.0/samples/sensor/tmp112/src/ |
D | main.c | 17 struct sensor_value attr; in do_main() local 19 attr.val1 = 150; in do_main() 20 attr.val2 = 0; in do_main() 22 SENSOR_ATTR_FULL_SCALE, &attr); in do_main() 28 attr.val1 = 8; in do_main() 29 attr.val2 = 0; in do_main() 31 SENSOR_ATTR_SAMPLING_FREQUENCY, &attr); in do_main()
|
/Zephyr-Core-3.7.0/tests/subsys/mem_mgmt/mem_attr_heap/boards/ |
D | qemu_cortex_m3.overlay | 2 #include <zephyr/dt-bindings/memory-attr/memory-attr.h> 3 #include <zephyr/dt-bindings/memory-attr/memory-attr-sw.h> 10 zephyr,memory-attr = <( DT_MEM_CACHEABLE )>; 17 zephyr,memory-attr = <( DT_MEM_CACHEABLE | DT_MEM_SW_ALLOC_CACHE )>; 24 zephyr,memory-attr = <( DT_MEM_SW_ALLOC_NON_CACHE )>; 31 zephyr,memory-attr = <( DT_MEM_DMA | DT_MEM_SW_ALLOC_DMA )>; 38 zephyr,memory-attr = <( DT_MEM_CACHEABLE | DT_MEM_SW_ALLOC_CACHE )>; 45 zephyr,memory-attr = <( DT_MEM_CACHEABLE | DT_MEM_DMA |
|
/Zephyr-Core-3.7.0/samples/sensor/mcux_acmp/src/ |
D | main.c | 37 int16_t attr; member 44 { .attr = SENSOR_ATTR_MCUX_ACMP_POSITIVE_PORT_INPUT, .val = 1 }, 47 { .attr = SENSOR_ATTR_MCUX_ACMP_POSITIVE_MUX_INPUT, 51 { .attr = SENSOR_ATTR_MCUX_ACMP_NEGATIVE_PORT_INPUT, .val = 0 }, 54 { .attr = SENSOR_ATTR_MCUX_ACMP_NEGATIVE_MUX_INPUT, 57 { .attr = SENSOR_ATTR_MCUX_ACMP_DAC_VOLTAGE_REFERENCE, 60 { .attr = SENSOR_ATTR_MCUX_ACMP_DAC_VALUE, .val = ACMP_DAC_VALUE }, 62 { .attr = SENSOR_ATTR_MCUX_ACMP_HYSTERESIS_LEVEL, .val = 3 }, 65 { .attr = SENSOR_ATTR_MCUX_ACMP_POSITIVE_DISCRETE_MODE, .val = 1 }, 69 { .attr = SENSOR_ATTR_MCUX_ACMP_OFFSET_LEVEL, .val = 0 }, [all …]
|