Home
last modified time | relevance | path

Searched refs:sa (Results 1 – 13 of 13) sorted by relevance

/bionic/tests/
Dspawn_test.cpp41 posix_spawnattr_t sa; in TEST() local
42 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
43 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
47 posix_spawnattr_t sa; in TEST() local
48 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
49 ASSERT_EQ(EINVAL, posix_spawnattr_setflags(&sa, ~0)); in TEST()
50 ASSERT_EQ(0, posix_spawnattr_destroy(&sa)); in TEST()
54 posix_spawnattr_t sa; in TEST() local
55 ASSERT_EQ(0, posix_spawnattr_init(&sa)); in TEST()
57 ASSERT_EQ(0, posix_spawnattr_setflags(&sa, POSIX_SPAWN_RESETIDS)); in TEST()
[all …]
Dsignal_test.cpp270 SigActionT sa = {}; in TestSigAction() local
271 sigaddset_fn(&sa.sa_mask, sig); in TestSigAction()
272 sa.sa_flags = SA_ONSTACK; in TestSigAction()
273 sa.sa_handler = no_op_signal_handler; in TestSigAction()
274 ASSERT_EQ(0, sigaction_fn(sig, &sa, nullptr)); in TestSigAction()
277 sa = {}; in TestSigAction()
278 ASSERT_EQ(0, sigaction_fn(sig, nullptr, &sa)); in TestSigAction()
279 ASSERT_TRUE(sa.sa_handler == no_op_signal_handler); in TestSigAction()
280 ASSERT_TRUE((void*) sa.sa_sigaction == (void*) sa.sa_handler); in TestSigAction()
281 ASSERT_EQ(static_cast<unsigned>(SA_ONSTACK), sa.sa_flags & ~sa_restorer); in TestSigAction()
[all …]
Dnetdb_test.cpp118 sockaddr* sa = reinterpret_cast<sockaddr*>(&ss); in TEST() local
126 ASSERT_EQ(0, getnameinfo(sa, too_much, tmp, sizeof(tmp), nullptr, 0, NI_NUMERICHOST)); in TEST()
128 ASSERT_EQ(0, getnameinfo(sa, just_right, tmp, sizeof(tmp), nullptr, 0, NI_NUMERICHOST)); in TEST()
130 ASSERT_EQ(EAI_FAMILY, getnameinfo(sa, too_little, tmp, sizeof(tmp), nullptr, 0, NI_NUMERICHOST)); in TEST()
137 ASSERT_EQ(0, getnameinfo(sa, too_much, tmp, sizeof(tmp), nullptr, 0, NI_NUMERICHOST)); in TEST()
139 ASSERT_EQ(0, getnameinfo(sa, just_right, tmp, sizeof(tmp), nullptr, 0, NI_NUMERICHOST)); in TEST()
141 ASSERT_EQ(EAI_FAMILY, getnameinfo(sa, too_little, tmp, sizeof(tmp), nullptr, 0, NI_NUMERICHOST)); in TEST()
Dsetjmp_test.cpp310 struct sigaction sa = {.sa_flags = SA_SIGINFO, .sa_sigaction = [](int, siginfo_t*, void*) {}}; in TEST() local
311 ASSERT_EQ(0, sigaction(SIGPROF, &sa, 0)); in TEST()
/bionic/libc/dns/net/
Dgetnameinfo.c116 int getnameinfo(const struct sockaddr* sa, socklen_t salen, char* host, size_t hostlen, in getnameinfo() argument
119 return android_getnameinfofornet(sa, salen, host, hostlen, serv, servlen, flags, in getnameinfo()
123 int android_getnameinfofornet(const struct sockaddr* sa, socklen_t salen, char* host, in android_getnameinfofornet() argument
127 switch (sa->sa_family) { in android_getnameinfofornet()
130 return getnameinfo_inet(sa, salen, host, hostlen, in android_getnameinfofornet()
133 return getnameinfo_local(sa, salen, host, hostlen, in android_getnameinfofornet()
146 getnameinfo_local(const struct sockaddr *sa, socklen_t salen, in getnameinfo_local() argument
151 (const struct sockaddr_un *)(const void *)sa; in getnameinfo_local()
172 getnameinfo_inet(const struct sockaddr* sa, socklen_t salen, in getnameinfo_inet() argument
191 if (sa == NULL) in getnameinfo_inet()
[all …]
/bionic/tests/libs/
Dheap_tagging_helper.cpp51 struct sigaction sa = {}; in main() local
52 sa.sa_sigaction = action; in main()
53 sa.sa_flags = SA_SIGINFO; in main()
54 sigaction(SIGSEGV, &sa, nullptr); in main()
69 sa.sa_sigaction = action2; in main()
70 sigaction(SIGSEGV, &sa, nullptr); in main()
Dstack_tagging_helper.cpp222 struct sigaction sa = {}; in SigActionScoped() local
223 sa.sa_sigaction = handler; in SigActionScoped()
224 sa.sa_flags = SA_SIGINFO | SA_ONSTACK; in SigActionScoped()
225 int res = sigaction(signo, &sa, &oldsa); in SigActionScoped()
/bionic/libc/bionic/
Dabort.cpp49 struct sigaction64 sa = { .sa_handler = SIG_DFL, .sa_flags = SA_RESTART }; in abort() local
50 sigaction64(SIGABRT, &sa, nullptr); in abort()
Dsignal.cpp161 struct sigaction64 sa = { .sa_handler = SIG_IGN }; in sigignore() local
162 return sigaction64(sig, &sa, nullptr); in sigignore()
196 struct sigaction64 sa = { .sa_handler = handler, .sa_flags = flags }; in _signal() local
197 return (sigaction64(sig, &sa, &sa) == -1) ? SIG_ERR : sa.sa_handler; in _signal()
/bionic/libfdtrack/
Dfdtrack.cpp88 struct sigaction sa = {}; in ctor() local
89 sa.sa_sigaction = [](int, siginfo_t* siginfo, void*) { in ctor()
96 sa.sa_flags = SA_SIGINFO | SA_ONSTACK; in ctor()
97 sigaction(BIONIC_SIGNAL_FDTRACK, &sa, nullptr); in ctor()
/bionic/libc/dns/resolv/
Dres_send.c156 struct sockaddr sa; member
194 if ( !bind( s, &u.sa, slen ) ) in random_bind()
205 return bind( s, &u.sa, slen ); in random_bind()
223 res_ourserver_p(const res_state statp, const struct sockaddr *sa) { in res_ourserver_p() argument
228 switch (sa->sa_family) { in res_ourserver_p()
230 inp = (const struct sockaddr_in *)(const void *)sa; in res_ourserver_p()
243 in6p = (const struct sockaddr_in6 *)(const void *)sa; in res_ourserver_p()
683 get_salen(const struct sockaddr *sa) in get_salen() argument
688 if (sa->sa_len) in get_salen()
689 return (sa->sa_len); in get_salen()
[all …]
Dres_private.h20 res_ourserver_p(const res_state statp, const struct sockaddr *sa);
/bionic/libc/upstream-netbsd/lib/libc/isc/
Deventlib_p.h94 struct sockaddr sa; member
102 struct sockaddr sa; member