Home
last modified time | relevance | path

Searched refs:sv (Results 1 – 25 of 149) sorted by relevance

123456

/freebsd/tests/sys/kern/
H A Dunix_stream.c42 do_socketpair(int *sv) in do_socketpair() argument
46 s = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); in do_socketpair()
48 ATF_REQUIRE(sv[0] >= 0); in do_socketpair()
49 ATF_REQUIRE(sv[1] >= 0); in do_socketpair()
50 ATF_REQUIRE(sv[0] != sv[1]); in do_socketpair()
69 int sv[2]; in ATF_TC_BODY() local
76 do_socketpair(sv); in ATF_TC_BODY()
78 ATF_REQUIRE_EQ(0, getpeereid(sv[0], &euid, &egid)); in ATF_TC_BODY()
82 ATF_REQUIRE_EQ(0, getpeereid(sv[1], &euid, &egid)); in ATF_TC_BODY()
86 close(sv[0]); in ATF_TC_BODY()
[all …]
H A Dunix_seqpacket_test.c50 do_socketpair(int *sv) in do_socketpair() argument
54 s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); in do_socketpair()
56 ATF_REQUIRE(sv[0] >= 0); in do_socketpair()
57 ATF_REQUIRE(sv[1] >= 0); in do_socketpair()
58 ATF_REQUIRE(sv[0] != sv[1]); in do_socketpair()
62 do_socketpair_nonblocking(int *sv) in do_socketpair_nonblocking() argument
66 s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); in do_socketpair_nonblocking()
68 ATF_REQUIRE(sv[0] >= 0); in do_socketpair_nonblocking()
69 ATF_REQUIRE(sv[1] >= 0); in do_socketpair_nonblocking()
70 ATF_REQUIRE(sv[0] != sv[1]); in do_socketpair_nonblocking()
[all …]
H A Dunix_socketpair_test.c
H A Dsendfile_helper.c50 tcp_socketpair(int *sv) in tcp_socketpair() argument
78 sv[0] = socket(PF_INET, SOCK_STREAM, 0); in tcp_socketpair()
79 if (sv[0] < 0) in tcp_socketpair()
82 flags = fcntl(sv[0], F_GETFL); in tcp_socketpair()
84 if (fcntl(sv[0], F_SETFL, flags) == -1) in tcp_socketpair()
87 if (connect(sv[0], (void *)&sin, sizeof(sin)) == -1 && in tcp_socketpair()
91 sv[1] = accept(ls, NULL, 0); in tcp_socketpair()
92 if (sv[1] < 0) in tcp_socketpair()
96 if (fcntl(sv[0], F_SETFL, flags) == -1) in tcp_socketpair()
/freebsd/tools/regression/sockets/unix_gc/
H A Dunix_gc.c183 my_socketpair(int *sv) in my_socketpair() argument
186 if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) < 0) in my_socketpair()
207 alloc3fds(int *s, int *sv) in alloc3fds() argument
212 if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) < 0) in alloc3fds()
274 int sv[2]; in twosome_nothing() local
282 my_socketpair(sv); in twosome_nothing()
283 close2(sv[0], sv[1]); in twosome_nothing()
292 my_socketpair(sv); in twosome_nothing()
293 close2(sv[0], sv[1]); in twosome_nothing()
305 int sv[2]; in twosome_drop_work() local
[all …]
/freebsd/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_os.h491 #define KMP_COMPARE_AND_STORE_RET32(p, cv, sv) \
492 InterlockedCompareExchange((volatile long *)(p), (long)(sv), (long)(cv))
530 #define KMP_COMPARE_AND_STORE_ACQ8(p, cv, sv) \
531 __kmp_compare_and_store_acq8((p), (cv), (sv))
532 #define KMP_COMPARE_AND_STORE_REL8(p, cv, sv) \
533 __kmp_compare_and_store_rel8((p), (cv), (sv))
534 #define KMP_COMPARE_AND_STORE_ACQ16(p, cv, sv) \
535 __kmp_compare_and_store_acq16((p), (cv), (sv))
540 #define KMP_COMPARE_AND_STORE_ACQ32(p, cv, sv) \
542 (kmp_int32)(sv))
[all …]
/freebsd/sys/kern/
H A Dkern_sharedpage.c305 struct sysentvec *sv; in exec_sysvec_init() local
309 sv = param; in exec_sysvec_init()
310 flags = sv->sv_flags; in exec_sysvec_init()
313 MPASS(sv->sv_shared_page_obj == NULL); in exec_sysvec_init()
314 MPASS(sv->sv_shared_page_base != 0); in exec_sysvec_init()
316 sv->sv_shared_page_obj = shared_page_obj; in exec_sysvec_init()
319 res = shared_page_fill((uintptr_t)sv->sv_szsigcode, in exec_sysvec_init()
320 16, sv->sv_sigcode); in exec_sysvec_init()
323 sv->sv_vdso_offset = res; in exec_sysvec_init()
324 sv->sv_sigcode_offset = res + sv->sv_sigcodeoff; in exec_sysvec_init()
[all …]
/freebsd/tools/regression/sockets/kqueue/
H A Dkqueue.c253 int kq, sv[2]; in main() local
266 if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) == -1) in main()
270 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main()
273 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main()
277 test_evfilt_read(kq, sv, "PF_UNIX, SOCK_DGRAM"); in main()
279 if (close(sv[0]) == -1) in main()
282 if (close(sv[1]) == -1) in main()
297 if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) == -1) in main()
300 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main()
302 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main()
[all …]
/freebsd/sys/netinet/
H A Dtcp_hpts.h169 tcp_tv_to_hptstick(const struct timeval *sv) in tcp_tv_to_hptstick() argument
171 return ((sv->tv_sec * 100000) + (sv->tv_usec / HPTS_TICKS_PER_SLOT)); in tcp_tv_to_hptstick()
175 tcp_tv_to_usectick(const struct timeval *sv) in tcp_tv_to_usectick() argument
177 return ((uint32_t) ((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); in tcp_tv_to_usectick()
181 tcp_tv_to_mssectick(const struct timeval *sv) in tcp_tv_to_mssectick() argument
183 return ((uint32_t) ((sv->tv_sec * HPTS_MSEC_IN_SEC) + (sv->tv_usec/HPTS_USEC_IN_MSEC))); in tcp_tv_to_mssectick()
187 tcp_tv_to_lusectick(const struct timeval *sv) in tcp_tv_to_lusectick() argument
189 return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); in tcp_tv_to_lusectick()
203 tcp_gethptstick(struct timeval *sv) in tcp_gethptstick() argument
207 if (sv == NULL) in tcp_gethptstick()
[all …]
/freebsd/contrib/tcsh/
H A Dtc.sig.h120 # define savesigvec(sv, sm) \ argument
124 sigaction(SIGINT, NULL, &(sv)[0]); \
125 sigaction(SIGQUIT, NULL, &(sv)[1]); \
126 sigaction(SIGTSTP, NULL, &(sv)[2]); \
127 sigaction(SIGTTIN, NULL, &(sv)[3]); \
128 sigaction(SIGTTOU, NULL, &(sv)[4]); \
129 sigaction(SIGTERM, NULL, &(sv)[5]); \
130 sigaction(SIGHUP, NULL, &(sv)[6]); \
142 # define restoresigvec(sv, sm) \ argument
144 sigaction(SIGINT, &(sv)[0], NULL); \
[all …]
/freebsd/sys/dev/drm2/
H A Ddrm_ioctl.c308 struct drm_set_version *sv = data; in drm_setversion() local
311 if (sv->drm_di_major != -1) { in drm_setversion()
312 if (sv->drm_di_major != DRM_IF_MAJOR || in drm_setversion()
313 sv->drm_di_minor < 0 || sv->drm_di_minor > DRM_IF_MINOR) { in drm_setversion()
317 if_version = DRM_IF_VERSION(sv->drm_di_major, in drm_setversion()
318 sv->drm_di_minor); in drm_setversion()
320 if (sv->drm_di_minor >= 1) { in drm_setversion()
331 if (sv->drm_dd_major != -1) { in drm_setversion()
332 if (sv->drm_dd_major != dev->driver->major || in drm_setversion()
333 sv->drm_dd_minor < 0 || sv->drm_dd_minor > in drm_setversion()
[all …]
/freebsd/sbin/ipf/libipf/
H A Dportname.c17 struct servent *sv = NULL; in portname() local
22 if ((sv = getservbyport(htons(port), "tcp"))) { in portname()
23 strncpy(buf, sv->s_name, sizeof(buf)-1); in portname()
26 sv = strncasecmp(buf, sv->s_name, strlen(buf)) ? in portname()
29 if (sv) in portname()
32 if ((sv = getservbyport(htons(port), p->p_name))) { in portname()
33 strncpy(buf, sv->s_name, sizeof(buf)-1); in portname()
/freebsd/tools/test/stress2/misc/
H A Dsendfile4.sh69 int sv[2];
86 error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv);
96 close(sv[1]);
99 error = sendfile(from, sv[0], pos, st.st_size - pos,
109 close(sv[0]);
112 close(sv[0]);
127 error = read(sv[1], buf + pos, written);
136 close(sv[1]);
H A Dsendfile5.sh94 int sv[2];
111 error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv);
119 close(sv[1]);
122 error = sendfile(from, sv[0], pos, st.st_size - pos,
132 close(sv[0]);
135 close(sv[0]);
150 error = read(sv[1], buf + pos, written);
159 close(sv[1]);
H A Dsocketpair4.sh107 int error, from, n, status, sv[2], to;
114 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
128 close(sv[1]);
138 if (write(sv[0], buf, n) != n)
147 close(sv[0]);
155 close(sv[0]);
162 n = read(sv[1], buf, sizeof(buf));
178 close(sv[1]);
H A Dsendfile15.sh115 int child, error, from, n, status, sv[2];
131 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
139 close(sv[1]);
142 error = sendfile(from, sv[0], pos, st.st_size - pos,
152 close(sv[0]);
157 close(sv[0]);
164 n = read(sv[1], buf + pos, written);
173 close(sv[1]);
H A Dsendfile16.sh111 int sv[2];
130 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
138 close(sv[1]);
141 error = sendfile(from, sv[0], pos, st.st_size - pos,
151 close(sv[0]);
156 close(sv[0]);
163 n = read(sv[1], buf + pos, written);
172 close(sv[1]);
H A Dsendfile23.sh111 int error, from, n, status, sv[2], to;
118 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
132 close(sv[1]);
136 error = sendfile(from, sv[0], pos, st.st_size - pos,
147 close(sv[0]);
157 close(sv[0]);
165 n = read(sv[1], buf, sizeof(buf));
175 close(sv[1]);
H A Dsendfile17.sh113 int child, error, from, n, status, sv[2];
129 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
138 close(sv[1]);
143 error = sendfile(from, sv[0], pos, st.st_size - pos,
156 close(sv[0]);
161 close(sv[0]);
170 n = read(sv[1], buf + pos, written);
180 close(sv[1]);
H A Dsendfile21.sh128 int error, from, n, status, sv[2], to;
135 if ((error = socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) == -1)
149 close(sv[1]);
172 error = sendfile(from, sv[0], pos, st.st_size - pos,
183 close(sv[0]);
193 close(sv[0]);
201 n = read(sv[1], buf, sizeof(buf));
211 close(sv[1]);
/freebsd/contrib/ntp/libntp/
H A Ddofptoa.c49 register u_short sv = (u_short)(val >> 16); in dofptoa()
54 tmp = sv; in dofptoa()
55 sv = (u_short) (sv/ten); in dofptoa()
56 *(--cp) = (u_char)(tmp - ((sv<<3) + (sv<<1))); in dofptoa()
57 } while (sv != 0); in dofptoa()
51 register u_short sv = (u_short)(val >> 16); dofptoa() local
/freebsd/contrib/netbsd-tests/fs/common/
H A Dfstest_puffs.c253 int sv[2]; in donewfs() local
268 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sv) == -1) in donewfs()
275 close(sv[1]); in donewfs()
276 snprintf(comfd, sizeof(sv[0]), "%d", sv[0]); in donewfs()
285 close(sv[0]); in donewfs()
290 if ((n = xread(sv[1], &len, sizeof(len))) != sizeof(len)) in donewfs()
294 if ((size_t)xread(sv[1], args->pta_dir, len) != len) in donewfs()
296 if (xread(sv[1], &len, sizeof(len)) != sizeof(len)) in donewfs()
300 if ((size_t)xread(sv[1], args->pta_dev, len) != len) in donewfs()
302 if (xread(sv[1], &mntflags, sizeof(mntflags)) != sizeof(mntflags)) in donewfs()
[all …]
/freebsd/tools/test/stress2/testcases/socket/
H A Dsocket.c46 static int sv[2]; variable
55 if ((n = read(sv[0], buf, bufsize)) < 0) in reader()
59 close(sv[0]); in reader()
74 if (write(sv[1], buf, bufsize) < 0) { in writer()
77 err(1, "write(%d), %s:%d", sv[1], in writer()
103 if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) != 0) in test()
/freebsd/bin/sh/
H A Dredir.c106 struct redirtab *sv = NULL; in redirect() local
118 sv = ckmalloc(sizeof (struct redirtab)); in redirect()
120 sv->renamed[i] = EMPTY; in redirect()
121 sv->fd0_redirected = fd0_redirected; in redirect()
122 sv->empty_redirs = empty_redirs - 1; in redirect()
123 sv->next = redirlist; in redirect()
124 redirlist = sv; in redirect()
136 if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) { in redirect()
149 sv->renamed[fd] = i; in redirect()
/freebsd/crypto/openssl/VMS/
H A Dopenssl_startup.com.in92 $ sv := {- platform->shlib_version_as_filename(); -}
100 $ DEF OSSL$ENGINES'sv''pz' OSSL$INSTROOT:[ENGINES'sv''pz'.'arch']
107 $ DEF OSSL$LIBCRYPTO'sv'_SHR'pz' OSSL$SHARE:OSSL$LIBCRYPTO'sv'_SHR'pz'.EXE
108 $ DEF OSSL$LIBSSL'sv'_SHR'pz' OSSL$SHARE:OSSL$LIBSSL'sv'_SHR'pz'.EXE
114 $ DEF OSSL$ENGINES'pz' OSSL$ENGINES'sv''pz'
116 $ DEF OSSL$LIBCRYPTO_SHR'pz' OSSL$LIBCRYPTO'sv'_SHR'pz'
117 $ DEF OSSL$LIBSSL_SHR'pz' OSSL$LIBSSL'sv'_SHR'pz'

123456