Lines Matching full:notify

8 #include <zephyr/sys/notify.h>
33 struct sys_notify notify = { in ZTEST() local
39 zassert_equal(sys_notify_validate(&notify), -EINVAL, in ZTEST()
50 struct sys_notify notify; in ZTEST() local
53 memset(&notify, 0xac, sizeof(notify)); in ZTEST()
54 rc = sys_notify_validate(&notify); in ZTEST()
58 sys_notify_init_spinwait(&notify); in ZTEST()
59 rc = sys_notify_validate(&notify); in ZTEST()
63 zassert_false(sys_notify_uses_callback(&notify), in ZTEST()
66 zassert_equal(notify.flags, SYS_NOTIFY_METHOD_SPINWAIT, in ZTEST()
69 set_extflags(&notify, xflags); in ZTEST()
70 zassert_equal(sys_notify_get_method(&notify), in ZTEST()
73 zassert_equal(get_extflags(&notify), xflags, in ZTEST()
76 rc = sys_notify_fetch_result(&notify, &res); in ZTEST()
80 zassert_not_equal(notify.flags, 0, in ZTEST()
83 cb = sys_notify_finalize(&notify, set_res); in ZTEST()
86 zassert_equal(notify.flags, 0, in ZTEST()
89 rc = sys_notify_fetch_result(&notify, &res); in ZTEST()
104 struct sys_notify notify; in ZTEST() local
107 memset(&notify, 0xac, sizeof(notify)); in ZTEST()
108 rc = sys_notify_validate(&notify); in ZTEST()
117 sys_notify_init_signal(&notify, &sig); in ZTEST()
118 notify.method.signal = NULL; in ZTEST()
119 rc = sys_notify_validate(&notify); in ZTEST()
123 memset(&notify, 0xac, sizeof(notify)); in ZTEST()
124 sys_notify_init_signal(&notify, &sig); in ZTEST()
125 rc = sys_notify_validate(&notify); in ZTEST()
129 zassert_false(sys_notify_uses_callback(&notify), in ZTEST()
132 zassert_equal(notify.flags, SYS_NOTIFY_METHOD_SIGNAL, in ZTEST()
134 zassert_equal(notify.method.signal, &sig, in ZTEST()
137 set_extflags(&notify, xflags); in ZTEST()
138 zassert_equal(sys_notify_get_method(&notify), in ZTEST()
141 zassert_equal(get_extflags(&notify), xflags, in ZTEST()
144 rc = sys_notify_fetch_result(&notify, &res); in ZTEST()
148 zassert_not_equal(notify.flags, 0, in ZTEST()
151 cb = sys_notify_finalize(&notify, set_res); in ZTEST()
154 zassert_equal(notify.flags, 0, in ZTEST()
162 rc = sys_notify_fetch_result(&notify, &res); in ZTEST()
176 struct sys_notify notify; in ZTEST() local
179 memset(&notify, 0xac, sizeof(notify)); in ZTEST()
180 rc = sys_notify_validate(&notify); in ZTEST()
184 sys_notify_init_callback(&notify, callback); in ZTEST()
185 notify.method.callback = NULL; in ZTEST()
186 rc = sys_notify_validate(&notify); in ZTEST()
190 memset(&notify, 0xac, sizeof(notify)); in ZTEST()
191 sys_notify_init_callback(&notify, callback); in ZTEST()
192 rc = sys_notify_validate(&notify); in ZTEST()
196 zassert_true(sys_notify_uses_callback(&notify), in ZTEST()
199 zassert_equal(notify.flags, SYS_NOTIFY_METHOD_CALLBACK, in ZTEST()
201 zassert_equal(notify.method.callback, in ZTEST()
205 set_extflags(&notify, xflags); in ZTEST()
206 zassert_equal(sys_notify_get_method(&notify), in ZTEST()
209 zassert_equal(get_extflags(&notify), xflags, in ZTEST()
212 rc = sys_notify_fetch_result(&notify, &res); in ZTEST()
216 zassert_not_equal(notify.flags, 0, in ZTEST()
219 cb = sys_notify_finalize(&notify, set_res); in ZTEST()
222 zassert_equal(notify.flags, 0, in ZTEST()
226 ((sys_notify_generic_callback)cb)(&notify, &res); in ZTEST()