/xnu-2422.115.4/tools/tests/libMicro/ |
H A D | pthread_create.c | 81 tsd_t *ts = (tsd_t *)tsd; local 84 ts->ts_threads = calloc(lm_optB, sizeof (pthread_t)); 85 (void) pthread_mutex_init(&ts->ts_lock, NULL); 88 ts->ts_attr = malloc(sizeof (pthread_attr_t)); 89 (void) pthread_attr_init(ts->ts_attr); 90 if ((errors = pthread_attr_setstacksize(ts->ts_attr, opts)) 96 ts->ts_attr = NULL; 104 tsd_t *ts = (tsd_t *)tsd; local 106 (void) pthread_mutex_lock(&ts->ts_lock); 115 tsd_t *ts local 127 tsd_t *ts = (tsd_t *)tsd; local 148 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | pipe.c | 164 tsd_t *ts = (tsd_t *)tsd; local 170 result = prepare_socketpair(ts); 173 result = prepare_localtcp(ts); 176 result = prepare_fifos(ts); 180 result = prepare_pipes(ts); 189 result = pthread_create(&ts->ts_thread, NULL, loopback, tsd); 204 ts->ts_child = pid; 214 if (write(ts->ts_out, wbuf, opts) != opts) { 217 if (readall(ts->ts_in, rbuf, opts) != opts) { 227 tsd_t *ts local 251 tsd_t *ts = (tsd_t *)tsd; local 315 tsd_t *ts = (tsd_t *)arg; local 335 prepare_localtcp_once(tsd_t *ts) argument 384 prepare_localtcp(tsd_t *ts) argument 444 prepare_socketpair(tsd_t *ts) argument 466 prepare_fifos(tsd_t *ts) argument 498 cleanup_fifos(tsd_t *ts) argument 511 prepare_pipes(tsd_t *ts) argument [all...] |
H A D | mktime.c | 61 tsd_t *ts = (tsd_t *)tsd; local 69 (void) localtime_r(&clock1, &ts->ts_tm1); 70 (void) localtime_r(&clock2, &ts->ts_tm2); 80 tsd_t *ts = (tsd_t *)tsd; local 84 t1 = ts->ts_tm1; 85 t2 = ts->ts_tm2; 89 t1 = ts->ts_tm1; 90 t2 = ts->ts_tm2; 94 t1 = ts->ts_tm1; 95 t2 = ts [all...] |
H A D | memcpy.c | 102 tsd_t *ts = (tsd_t *)tsd; local 105 ts->ts_srcsize = 64 * 1024 * 1024; 107 ts->ts_srcsize = opts + opta; 110 ts->ts_destsize = 64 * 1024 * 1024; 112 ts->ts_destsize = (int)opts; 115 ts->ts_src = opta + (char *)valloc(ts->ts_srcsize); 116 ts->ts_dest = valloc(ts->ts_destsize); 124 tsd_t *ts local [all...] |
H A D | memmove.c | 102 tsd_t *ts = (tsd_t *)tsd; local 105 ts->ts_srcsize = 64 * 1024 * 1024; 107 ts->ts_srcsize = opts + opta; 110 ts->ts_destsize = 64 * 1024 * 1024; 112 ts->ts_destsize = (int)opts; 115 ts->ts_src = opta + (char *)valloc(ts->ts_srcsize); 116 ts->ts_dest = valloc(ts->ts_destsize); 124 tsd_t *ts local [all...] |
H A D | strchr.c | 85 tsd_t *ts = (tsd_t *)tsd; local 90 if (ts->ts_once++ == 0) { 94 ts->ts_string = malloc(opts + 1 + unaligned); 95 ts->ts_string += unaligned; 99 ts->ts_string[i] = demo[i%l]; 102 ts->ts_string[opts] = 0; 112 tsd_t *ts = (tsd_t *)tsd; local 113 char *src = ts->ts_string; 116 ts->ts_fakegcc = strchr(src, 'X'); 117 ts [all...] |
H A D | strlen.c | 85 tsd_t *ts = (tsd_t *)tsd; local 89 if (ts->ts_once++ == 0) { 93 ts->ts_string = malloc(opts + 1 + unaligned); 94 ts->ts_string += unaligned; 98 ts->ts_string[i] = demo[i%l]; 101 ts->ts_string[opts] = 0; 111 tsd_t *ts = (tsd_t *)tsd; local 112 char *src = ts->ts_string; 115 ts->ts_fakegcc += strlen(src); 116 ts [all...] |
H A D | cascade_fcntl.c | 161 tsd_t *ts = (tsd_t *)tsd; local 164 if (ts->ts_once == 0) { 175 ts->ts_id = us; 178 ts->ts_us0 = (us * 4); 179 ts->ts_us1 = (us * 4) + 2; 182 ts->ts_them0 = (them * 4); 183 ts->ts_them1 = (them * 4) + 2; 186 ts->ts_them0 = (them * 4) + 2; 187 ts->ts_them1 = (them * 4); 190 ts 202 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | cascade_flock.c | 157 tsd_t *ts = (tsd_t *)tsd; local 160 if (ts->ts_once == 0) { 171 ts->ts_id = us; 174 ts->ts_us0 = (us * 2); 175 ts->ts_us1 = (us * 2) + 1; 178 ts->ts_them0 = (them * 2); 179 ts->ts_them1 = (them * 2) + 1; 182 ts->ts_them0 = (them * 2) + 1; 183 ts->ts_them1 = (them * 2); 186 ts 198 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | cascade_lockf.c | 152 tsd_t *ts = (tsd_t *)tsd; local 155 if (ts->ts_once == 0) { 166 ts->ts_id = us; 169 ts->ts_us0 = (us * 2); 170 ts->ts_us1 = (us * 2) + 1; 173 ts->ts_them0 = (them * 2); 174 ts->ts_them1 = (them * 2) + 1; 177 ts->ts_them0 = (them * 2) + 1; 178 ts->ts_them1 = (them * 2); 181 ts 193 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | cascade_mutex.c | 156 tsd_t *ts = (tsd_t *)tsd; local 159 if (ts->ts_once == 0) { 170 ts->ts_id = us; 173 ts->ts_us0 = (us * 2); 174 ts->ts_us1 = (us * 2) + 1; 177 ts->ts_them0 = (them * 2); 178 ts->ts_them1 = (them * 2) + 1; 181 ts->ts_them0 = (them * 2) + 1; 182 ts->ts_them1 = (them * 2); 185 ts 197 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | close_tcp.c | 83 tsd_t *ts = (tsd_t *)tsd; local 89 ts->ts_lsns = (int *)malloc(lm_optB * sizeof (int)); 90 if (ts->ts_lsns == NULL) { 93 ts->ts_accs = (int *)malloc(lm_optB * sizeof (int)); 94 if (ts->ts_accs == NULL) { 97 ts->ts_cons = (int *)malloc(lm_optB * sizeof (int)); 98 if (ts->ts_cons == NULL) { 101 ts->ts_adds = (struct sockaddr_in *)malloc(lm_optB * 103 if (ts->ts_adds == NULL) { 109 ts 157 tsd_t *ts = (tsd_t *)tsd; local 205 tsd_t *ts = (tsd_t *)tsd; local 221 tsd_t *ts = (tsd_t *)tsd; local 234 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | strftime.c | 95 tsd_t *ts = (tsd_t *)tsd; local 100 (void) localtime_r(&clock1, &ts->ts_tm1); 101 (void) localtime_r(&clock2, &ts->ts_tm2); 111 tsd_t *ts = (tsd_t *)tsd; local 115 (void) strftime(s, MAXSIZE, optf, &ts->ts_tm1); 116 (void) strftime(s, MAXSIZE, optf, &ts->ts_tm2); 117 (void) strftime(s, MAXSIZE, optf, &ts->ts_tm1); 118 (void) strftime(s, MAXSIZE, optf, &ts->ts_tm2); 119 (void) strftime(s, MAXSIZE, optf, &ts->ts_tm1); 120 (void) strftime(s, MAXSIZE, optf, &ts [all...] |
H A D | memset.c | 101 tsd_t *ts = (tsd_t *)tsd; local 106 ts->ts_size = 1024 * 1024 * 64; 107 ts->ts_offset = opta; 109 ts->ts_size = opta + opts; 110 ts->ts_offset = opta; 113 if ((ts->ts_buff = (char *)valloc(ts->ts_size)) == NULL) 116 for (i = 0; i < ts->ts_size; i++) 117 ts->ts_buff[i] = 0; 126 tsd_t *ts local [all...] |
H A D | dup.c | 94 tsd_t *ts = (tsd_t *)tsd; local 98 if (ts->ts_once++ == 0) { 99 ts->ts_fds = (int *)malloc(lm_optB * sizeof (int)); 100 if (ts->ts_fds == NULL) { 104 ts->ts_fds[i] = -1; 114 tsd_t *ts = (tsd_t *)tsd; local 118 ts->ts_fds[i] = dup(fd); 119 if (ts->ts_fds[i] == -1) { 131 tsd_t *ts = (tsd_t *)tsd; local 135 (void) close(ts [all...] |
H A D | fork.c | 78 tsd_t *ts = (tsd_t *)tsd; local 81 if (ts->ts_once++ == 0) { 82 ts->ts_pids = (int *)malloc(lm_optB * sizeof (pid_t)); 83 if (ts->ts_pids == NULL) { 94 tsd_t *ts = (tsd_t *)tsd; local 98 ts->ts_pids[i] = fork(); 99 switch (ts->ts_pids[i]) { 121 tsd_t *ts = (tsd_t *)tsd; local 125 if (ts->ts_pids[i] > 0) { 126 (void) waitpid(ts [all...] |
H A D | open.c | 93 tsd_t *ts = (tsd_t *)tsd; local 97 if (ts->ts_once++ == 0) { 98 ts->ts_fds = (int *)malloc(lm_optB * sizeof (int)); 99 if (ts->ts_fds == NULL) { 103 ts->ts_fds[i] = -1; 113 tsd_t *ts = (tsd_t *)tsd; local 117 ts->ts_fds[i] = open(optf, O_RDONLY); 118 if (ts->ts_fds[i] < 0) { 130 tsd_t *ts = (tsd_t *)tsd; local 134 (void) close(ts [all...] |
H A D | socket.c | 114 tsd_t *ts = (tsd_t *)tsd; local 116 if (ts->ts_once++ == 0) { 117 ts->ts_fds = (int *)malloc(lm_optB * sizeof (int)); 118 if (ts->ts_fds == NULL) { 122 ts->ts_fds[i] = -1; 133 tsd_t *ts = (tsd_t *)tsd; local 136 ts->ts_fds[i] = socket(family, SOCK_STREAM, 0); 137 if (ts->ts_fds[i] == -1) { 150 tsd_t *ts = (tsd_t *)tsd; local 153 (void) close(ts [all...] |
H A D | write.c | 105 tsd_t *ts = (tsd_t *)tsd; local 108 if (ts->ts_buf == NULL) { 109 ts->ts_buf = malloc(opts); 110 ts->ts_fd = open(optf, O_WRONLY); 114 (void) directio(ts->ts_fd, DIRECTIO_ON); 122 ts->ts_buf[i] = 0; 125 (void) lseek(ts->ts_fd, 0, SEEK_SET); 133 tsd_t *ts = (tsd_t *)tsd; local 137 if (write(ts->ts_fd, ts [all...] |
/xnu-2422.115.4/tools/tests/libMicro/apple/ |
H A D | trivial.c | 172 tsd_t *ts = (tsd_t *)tsd; local 173 ts->ts_once = optt; 174 debug("benchmark_initworker: ts_once = %i\n",ts->ts_once); 185 tsd_t *ts = (tsd_t *)tsd; local 187 ts->ts_once++; 188 ts->ts_once--; 189 debug("benchmark_initbatch: ts_once = %i\n",ts->ts_once); 201 tsd_t *ts = (tsd_t *)tsd; local 204 debug("in to benchmark - optB = %i : ts_once = %i\n", lm_optB, ts->ts_once); 207 * just to show that ts reall 220 tsd_t *ts = (tsd_t *)tsd; local 232 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | lmbench_select_file.c | 122 tsd_t* ts = (tsd_t*)tsd; local 123 //(void) fprintf(stderr, "open_file: ts->fname = %s\n",ts->fname); 124 return (int) open(ts->fname, O_RDONLY); 131 tsd_t* ts = (tsd_t*)tsd; local 134 ts->pid = 0; 135 //(void) fprintf(stderr, "server: state->fid_f = %i\n",ts->fid_f); 137 if (ts->fid_f == open_file) { 139 sprintf(ts->fname, "/tmp/lat_selectXXXXXX"); 140 //(void) fprintf(stderr, "server: ts 260 tsd_t *ts = (tsd_t *)tsd; local 305 tsd_t *ts = (tsd_t *)tsd; local 383 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | lb_mmtest.c | 156 tsd_t *ts = (tsd_t *)tsd; local 158 request = (mach_msg_header_t *)ts->request_msg; 160 reply = (mach_msg_header_t *)ts->reply_msg; 166 if (ts->verbose) printf("Awaiting message\n"); 171 ts->request_msg_size, 172 ts->server_port, 183 if (ts->verbose) printf("Received message\n"); 187 complex_request = (ipc_complex_message *)ts->request_msg; 193 if (ts->verbose) printf("Sending reply\n"); 195 reply->msgh_size = ts 243 tsd_t *ts = (tsd_t *)tsd; local 331 tsd_t *ts = (tsd_t *)tsd; local 508 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | create_file.c | 163 // tsd_t *ts = (tsd_t *)tsd; 164 // debug("benchmark_initworker: ts_once = %i\n",ts->ts_once); 175 tsd_t *ts = (tsd_t *)tsd; local 177 ts->ts_once++; 178 ts->ts_once--; 179 debug("benchmark_initbatch: ts_once = %i\n",ts->ts_once); 191 // tsd_t *ts = (tsd_t *)tsd; 194 debug("in to benchmark - optB = %i : ts_once = %i\n", lm_optB, ts->ts_once); 200 debug("out of benchmark - optB = %i : ts_once = %i\n", lm_optB, ts->ts_once); 208 // tsd_t *ts 216 tsd_t *ts = (tsd_t *)tsd; local [all...] |
H A D | lmbench_write.c | 108 tsd_t *ts = (tsd_t *)tsd; local 111 if (ts->ts_buf == NULL) { 112 ts->ts_buf = malloc(opts); 113 ts->ts_fd = open(optf, O_WRONLY); 117 (void) directio(ts->ts_fd, DIRECTIO_ON); 125 ts->ts_buf[i] = 0; 128 (void) lseek(ts->ts_fd, 0, SEEK_SET); 136 tsd_t *ts = (tsd_t *)tsd; local 150 if (write(ts->ts_fd, ts [all...] |
H A D | lmbench_bw_mem.c | 155 tsd_t *ts = (tsd_t *)cookie; local 159 ts->buf = (TYPE *)valloc(ts->nbytes); 160 ts->buf2_orig = NULL; 161 ts->lastone = (TYPE*)ts->buf - 1; 162 ts->lastone = (TYPE*)((char *)ts->buf + ts->nbytes - 512); 163 ts 192 tsd_t *ts = (tsd_t *)cookie; local 203 tsd_t *ts = (tsd_t *)cookie; local 228 tsd_t *ts = (tsd_t *)cookie; local 249 tsd_t *ts = (tsd_t *)cookie; local 272 tsd_t *ts = (tsd_t *)cookie; local 297 tsd_t *ts = (tsd_t *)cookie; local 337 tsd_t *ts = (tsd_t *)cookie; local 378 tsd_t *ts = (tsd_t *)cookie; local 417 tsd_t *ts = (tsd_t *)cookie; local 429 tsd_t *ts = (tsd_t *)cookie; local 448 tsd_t *ts = (tsd_t *)tsd; local 544 tsd_t *ts = (tsd_t *)tsd; local 589 tsd_t *ts = (tsd_t *)tsd; local 611 tsd_t *ts = (tsd_t *)tsd; local [all...] |