/freebsd-current/tests/sys/kern/ |
H A D | unix_stream.c | 41 do_socketpair(int *sv) argument 45 s = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); 47 ATF_REQUIRE(sv[0] >= 0); 48 ATF_REQUIRE(sv[1] >= 0); 49 ATF_REQUIRE(sv[0] != sv[1]); 56 int sv[2]; local 63 do_socketpair(sv); 65 ATF_REQUIRE_EQ(0, getpeereid(sv[0], &euid, &egid)); 69 ATF_REQUIRE_EQ(0, getpeereid(sv[ 81 int sv[2]; local [all...] |
H A D | unix_seqpacket_test.c | 50 do_socketpair(int *sv) argument 54 s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); 56 ATF_REQUIRE(sv[0] >= 0); 57 ATF_REQUIRE(sv[1] >= 0); 58 ATF_REQUIRE(sv[0] != sv[1]); 62 do_socketpair_nonblocking(int *sv) argument 66 s = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sv); 68 ATF_REQUIRE(sv[0] >= 0); 69 ATF_REQUIRE(sv[ 80 mk_listening_socket(int *sv) argument 109 mk_pair_of_sockets(int *sv) argument 154 int sv[2]; local 191 int sv[2]; local 236 int sv[2]; local 364 int sv[2]; local 424 int sv[2]; local 596 int sv[2]; local 663 int sv[2]; local 719 int sv[2]; local 759 int sv[2]; local 813 int sv[2]; local 901 int sv[2]; local 966 int sv[2]; local [all...] |
H A D | sendfile_helper.c | 50 tcp_socketpair(int *sv) argument 78 sv[0] = socket(PF_INET, SOCK_STREAM, 0); 79 if (sv[0] < 0) 82 flags = fcntl(sv[0], F_GETFL); 84 if (fcntl(sv[0], F_SETFL, flags) == -1) 87 if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 || 91 sv[1] = accept(ls, NULL, 0); 92 if (sv[1] < 0) 96 if (fcntl(sv[0], F_SETFL, flags) == -1)
|
/freebsd-current/sbin/ipf/libipf/ |
H A D | portname.c | 17 struct servent *sv = NULL; local 22 if ((sv = getservbyport(htons(port), "tcp"))) { 23 strncpy(buf, sv->s_name, sizeof(buf)-1); 26 sv = strncasecmp(buf, sv->s_name, strlen(buf)) ? 29 if (sv) 32 if ((sv = getservbyport(htons(port), p->p_name))) { 33 strncpy(buf, sv->s_name, sizeof(buf)-1);
|
/freebsd-current/contrib/tcsh/ |
H A D | tc.sig.h | 120 # define savesigvec(sv, sm) \ 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) \ 144 sigaction(SIGINT, &(sv)[ [all...] |
/freebsd-current/tools/regression/sockets/unix_gc/ |
H A D | unix_gc.c | 183 my_socketpair(int *sv) argument 186 if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) < 0) 207 alloc3fds(int *s, int *sv) argument 212 if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) < 0) 274 int sv[2]; local 282 my_socketpair(sv); 283 close2(sv[0], sv[1]); 292 my_socketpair(sv); 293 close2(sv[ 305 int sv[2]; local 342 int s, sv[2]; local 360 int s, sv[2]; local 575 int s, sv[2]; local 655 int slisten, sconnect, sv[2]; local 687 int slisten, sconnect, sv[2]; local [all...] |
/freebsd-current/sys/netinet/ |
H A D | tcp_hpts.h | 169 tcp_tv_to_hptstick(const struct timeval *sv) argument 171 return ((sv->tv_sec * 100000) + (sv->tv_usec / HPTS_TICKS_PER_SLOT)); 175 tcp_tv_to_usectick(const struct timeval *sv) argument 177 return ((uint32_t) ((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); 181 tcp_tv_to_mssectick(const struct timeval *sv) argument 183 return ((uint32_t) ((sv->tv_sec * HPTS_MSEC_IN_SEC) + (sv->tv_usec/HPTS_USEC_IN_MSEC))); 187 tcp_tv_to_lusectick(const struct timeval *sv) argument 203 tcp_gethptstick(struct timeval *sv) argument [all...] |
/freebsd-current/crypto/openssh/openbsd-compat/ |
H A D | sigact.h | 69 struct sigvec sv; member in struct:sigaction 75 #define sa_mask sv.sv_mask 77 #define sa_handler sv.sv_handler 79 #define sa_flags sv.sv_flags
|
/freebsd-current/tools/regression/sockets/kqueue/ |
H A D | kqueue.c | 253 int kq, sv[2]; local 266 if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) == -1) 270 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) 273 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) 277 test_evfilt_read(kq, sv, "PF_UNIX, SOCK_DGRAM"); 279 if (close(sv[0]) == -1) 280 fail(errno, "close", "PF_UNIX/SOCK_DGRAM", "sv[0]"); 282 if (close(sv[1]) == -1) 283 fail(errno, "close", "PF_UNIX/SOCK_DGRAM", "sv[1]"); 297 if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sv) [all...] |
/freebsd-current/tools/regression/sockets/unix_sorflush/ |
H A D | unix_sorflush.c | 72 int sv[2]; local 74 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sv) < 0) 81 receive_and_exit(sv[1]); 90 shutdown_and_exit(sv[1]);
|
/freebsd-current/tools/test/stress2/testcases/socket/ |
H A D | socket.c | 46 static int sv[2]; variable 55 if ((n = read(sv[0], buf, bufsize)) < 0) 59 close(sv[0]); 74 if (write(sv[1], buf, bufsize) < 0) { 77 err(1, "write(%d), %s:%d", sv[1], 103 if (socketpair(PF_UNIX, SOCK_STREAM, 0, sv) != 0)
|
/freebsd-current/contrib/ntp/libntp/ |
H A D | dofptoa.c | 51 register u_short sv = (u_short)(val >> 16); local 56 tmp = sv; 57 sv = (u_short) (sv/ten); 58 *(--cp) = (u_char)(tmp - ((sv<<3) + (sv<<1))); 59 } while (sv != 0);
|
H A D | syssignal.c | 69 struct sigvec sv; local 72 ZERO(sv); 73 sv.sv_handler = func; 74 n = sigvec(sig, &sv, (struct sigvec *)NULL);
|
/freebsd-current/sys/kern/ |
H A D | kern_sharedpage.c | 305 struct sysentvec *sv; local 309 sv = param; 310 flags = sv->sv_flags; 313 MPASS(sv->sv_shared_page_obj == NULL); 314 MPASS(sv->sv_shared_page_base != 0); 316 sv->sv_shared_page_obj = shared_page_obj; 319 res = shared_page_fill((uintptr_t)sv->sv_szsigcode, 320 16, sv->sv_sigcode); 323 sv->sv_vdso_offset = res; 324 sv 376 exec_sysvec_init_secondary(struct sysentvec *sv, struct sysentvec *sv2) argument [all...] |
/freebsd-current/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_os.h | 490 #define KMP_COMPARE_AND_STORE_RET32(p, cv, sv) \ 491 InterlockedCompareExchange((volatile long *)(p), (long)(sv), (long)(cv)) 529 #define KMP_COMPARE_AND_STORE_ACQ8(p, cv, sv) \ 530 __kmp_compare_and_store_acq8((p), (cv), (sv)) 531 #define KMP_COMPARE_AND_STORE_REL8(p, cv, sv) \ 532 __kmp_compare_and_store_rel8((p), (cv), (sv)) 533 #define KMP_COMPARE_AND_STORE_ACQ16(p, cv, sv) \ 534 __kmp_compare_and_store_acq16((p), (cv), (sv)) 536 #define KMP_COMPARE_AND_STORE_REL16(p, cv, sv) \ 537 __kmp_compare_and_store_rel16((p), (cv), (sv)) 559 __kmp_compare_and_store_acq8(volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv) argument 564 __kmp_compare_and_store_rel8(volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv) argument 569 __kmp_compare_and_store_acq16(volatile kmp_int16 *p, kmp_int16 cv, kmp_int16 sv) argument 574 __kmp_compare_and_store_rel16(volatile kmp_int16 *p, kmp_int16 cv, kmp_int16 sv) argument 579 __kmp_compare_and_store_acq32(volatile kmp_int32 *p, kmp_int32 cv, kmp_int32 sv) argument 584 __kmp_compare_and_store_rel32(volatile kmp_int32 *p, kmp_int32 cv, kmp_int32 sv) argument 589 __kmp_compare_and_store_acq64(volatile kmp_int64 *p, kmp_int64 cv, kmp_int64 sv) argument 594 __kmp_compare_and_store_rel64(volatile kmp_int64 *p, kmp_int64 cv, kmp_int64 sv) argument 599 __kmp_compare_and_store_ptr(void *volatile *p, void *cv, void *sv) argument 832 mips_sync_bool_compare_and_swap(volatile kmp_uint64 *p, kmp_uint64 cv, kmp_uint64 sv) argument 838 mips_sync_val_compare_and_swap(volatile kmp_uint64 *p, kmp_uint64 cv, kmp_uint64 sv) argument [all...] |
/freebsd-current/tools/test/stress2/misc/ |
H A D | overflow3.sh | 50 int nfds, sv[2]; 53 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sv) != 0) 79 if (sendmsg(sv[0], &hdr, 0) != 1) 81 if (recvmsg(sv[1], &rhdr, 0) != 1)
|
H A D | sendfile4.sh | 69 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 D | sendfile15.sh | 115 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 D | sendfile5.sh | 94 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 D | sendmsg2.sh | 63 int sv[2]; 69 ret = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); 91 ret = sendmsg(sv[0], &msg, 0); 109 ret = recvmsg(sv[1], &msg, 0);
|
/freebsd-current/sys/dev/drm2/ |
H A D | drm_ioctl.c | 308 struct drm_set_version *sv = data; local 311 if (sv->drm_di_major != -1) { 312 if (sv->drm_di_major != DRM_IF_MAJOR || 313 sv->drm_di_minor < 0 || sv->drm_di_minor > DRM_IF_MINOR) { 317 if_version = DRM_IF_VERSION(sv->drm_di_major, 318 sv->drm_di_minor); 320 if (sv->drm_di_minor >= 1) { 331 if (sv->drm_dd_major != -1) { 332 if (sv [all...] |
/freebsd-current/lib/libthr/tests/ |
H A D | pthread_sigqueue_test.c | 82 union sigval sv; local 96 memset(&sv, 0, sizeof(sv)); 106 sv.sival_int = i + 1000; 107 error = pthread_sigqueue(thr[i], SIGUSR1, sv);
|
/freebsd-current/contrib/elftoolchain/libelf/ |
H A D | elf_end.c | 42 Elf *sv; local 87 sv = e; 90 _libelf_release_elf(sv);
|
/freebsd-current/contrib/netbsd-tests/fs/common/ |
H A D | fstest_puffs.c | 253 int sv[2]; local 268 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sv) == -1) 275 close(sv[1]); 276 snprintf(comfd, sizeof(sv[0]), "%d", sv[0]); 285 close(sv[0]); 290 if ((n = xread(sv[1], &len, sizeof(len))) != sizeof(len)) 294 if ((size_t)xread(sv[1], args->pta_dir, len) != len) 296 if (xread(sv[1], &len, sizeof(len)) != sizeof(len)) 300 if ((size_t)xread(sv[ [all...] |
/freebsd-current/bin/sh/ |
H A D | redir.c | 106 struct redirtab *sv = NULL; local 118 sv = ckmalloc(sizeof (struct redirtab)); 120 sv->renamed[i] = EMPTY; 121 sv->fd0_redirected = fd0_redirected; 122 sv->empty_redirs = empty_redirs - 1; 123 sv->next = redirlist; 124 redirlist = sv; 136 if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) { 149 sv->renamed[fd] = i;
|