/qemu/util/ |
H A D | qemu-timer.c | 255 QEMUTimer *ts; in qemu_clock_deadline_ns_all() local 270 while (ts && (ts->attributes & ~attr_mask)) { in qemu_clock_deadline_ns_all() 271 ts = ts->next; in qemu_clock_deadline_ns_all() 273 if (!ts) { in qemu_clock_deadline_ns_all() 368 ts->cb = cb; in timer_init_full() 414 ts->next = *pt; in timer_mod_ns_locked() 467 if (ts->expire_time == -1 || ts->expire_time > expire_time) { in timer_mod_anticipate_ns() 483 timer_mod_ns(ts, expire_time * ts->scale); in timer_mod() 488 timer_mod_anticipate_ns(ts, expire_time * ts->scale); in timer_mod_anticipate() 503 QEMUTimer *ts; in timerlist_run_timers() local [all …]
|
H A D | throttle.c | 65 ts->previous_leak = now; in throttle_do_leak() 183 throttle_do_leak(ts, now); in throttle_compute_timer() 228 void throttle_init(ThrottleState *ts) in throttle_init() argument 230 memset(ts, 0, sizeof(ThrottleState)); in throttle_init() 231 throttle_config_init(&ts->cfg); in throttle_init() 396 void throttle_config(ThrottleState *ts, in throttle_config() argument 402 ts->cfg = *cfg; in throttle_config() 406 ts->cfg.buckets[i].level = 0; in throttle_config() 420 *cfg = ts->cfg; in throttle_get_config() 445 must_wait = throttle_compute_timer(ts, in throttle_schedule_timer() [all …]
|
H A D | qemu-thread-posix.c | 56 static void compute_abs_deadline(struct timespec *ts, int ms) in compute_abs_deadline() argument 58 clock_gettime(qemu_timedwait_clockid(), ts); in compute_abs_deadline() 59 ts->tv_nsec += (ms % 1000) * 1000000; in compute_abs_deadline() 60 ts->tv_sec += ms / 1000; in compute_abs_deadline() 61 if (ts->tv_nsec >= 1000000000) { in compute_abs_deadline() 62 ts->tv_sec++; in compute_abs_deadline() 63 ts->tv_nsec -= 1000000000; in compute_abs_deadline() 250 struct timespec ts; in qemu_cond_timedwait_impl() local 252 compute_abs_deadline(&ts, ms); in qemu_cond_timedwait_impl() 288 struct timespec ts; in qemu_sem_timedwait() local [all …]
|
H A D | qemu-coroutine-sleep.c | 67 QEMUTimer ts; in qemu_co_sleep_ns_wakeable() local 69 aio_timer_init(ctx, &ts, type, SCALE_NS, co_sleep_cb, w); in qemu_co_sleep_ns_wakeable() 70 timer_mod(&ts, qemu_clock_get_ns(type) + ns); in qemu_co_sleep_ns_wakeable() 78 timer_del(&ts); in qemu_co_sleep_ns_wakeable()
|
/qemu/linux-user/ |
H A D | vm86.c | 77 TaskState *ts = get_task_state(cs); in save_v86_state() local 99 set_flags(env->eflags, ts->v86flags, VIF_MASK | ts->v86mask); in save_v86_state() 139 ts->v86flags |= VIF_MASK; in set_IF() 140 if (ts->v86flags & VIP_MASK) { in set_IF() 152 ts->v86flags &= ~VIF_MASK; in clear_IF() 170 set_flags(ts->v86flags, eflags, ts->v86mask); in set_vflags_long() 184 set_flags(ts->v86flags, flags, ts->v86mask & 0xffff); in set_vflags_short() 200 if (ts->v86flags & VIF_MASK) in get_vflags() 203 return flags | (ts->v86flags & ts->v86mask); in get_vflags() 438 ts->target_v86 = vm86_addr; in do_vm86() [all …]
|
H A D | signal.c | 204 *oldset = ts->signal_mask; in do_sigprocmask() 216 sigorset(&ts->signal_mask, &ts->signal_mask, set); in do_sigprocmask() 246 ts->signal_mask = *set; in set_sigmask() 275 return ts->sigaltstack_used.ss_sp + ts->sigaltstack_used.ss_size; in target_sigsp() 1001 ts->signal_pending = 1; in host_signal_handler() 1240 &ts->sigsuspend_mask : &ts->signal_mask; in handle_pending_signal() 1242 ts->in_sigsuspend = 0; in handle_pending_signal() 1303 &ts->sigsuspend_mask : &ts->signal_mask; in process_pending_signals() 1321 ts->in_sigsuspend = 0; in process_pending_signals() 1322 set = ts->signal_mask; in process_pending_signals() [all …]
|
H A D | main.c | 193 void task_settid(TaskState *ts) in task_settid() argument 195 if (ts->ts_tid == 0) { in task_settid() 210 void init_task_state(TaskState *ts) in init_task_state() argument 215 ts->used = 1; in init_task_state() 679 TaskState *ts; in main() local 947 ts = g_new0(TaskState, 1); in main() 948 init_task_state(ts); in main() 950 ts->info = info; in main() 951 ts->bprm = &bprm; in main() 952 cpu->opaque = ts; in main() [all …]
|
/qemu/tests/qtest/ |
H A D | tpm-crb-swtpm-test.c | 30 const TestState *ts = data; in tpm_crb_swtpm_test() local 38 const TestState *ts = data; in tpm_crb_swtpm_migration_test() local 40 tpm_test_swtpm_migration_test(ts->src_tpm_path, ts->dst_tpm_path, ts->uri, in tpm_crb_swtpm_migration_test() 47 TestState ts = { 0 }; in main() local 51 ts.uri = g_strdup_printf("unix:%s/migsocket", ts.src_tpm_path); in main() 57 qtest_add_data_func("/tpm/crb-swtpm-migration/test", &ts, in main() 61 tpm_util_rmdir(ts.dst_tpm_path); in main() 62 g_free(ts.dst_tpm_path); in main() 63 tpm_util_rmdir(ts.src_tpm_path); in main() 64 g_free(ts.src_tpm_path); in main() [all …]
|
H A D | tpm-tis-device-swtpm-test.c | 35 const TestState *ts = data; in tpm_tis_swtpm_test() local 37 tpm_test_swtpm_test(ts->src_tpm_path, tpm_tis_transfer, in tpm_tis_swtpm_test() 43 const TestState *ts = data; in tpm_tis_swtpm_migration_test() local 45 tpm_test_swtpm_migration_test(ts->src_tpm_path, ts->dst_tpm_path, ts->uri, in tpm_tis_swtpm_migration_test() 53 TestState ts = { 0 }; in main() local 59 ts.uri = g_strdup_printf("unix:%s/migsocket", ts.src_tpm_path); in main() 69 tpm_util_rmdir(ts.dst_tpm_path); in main() 70 g_free(ts.dst_tpm_path); in main() 71 tpm_util_rmdir(ts.src_tpm_path); in main() 72 g_free(ts.src_tpm_path); in main() [all …]
|
H A D | tpm-tis-swtpm-test.c | 33 const TestState *ts = data; in tpm_tis_swtpm_test() local 35 tpm_test_swtpm_test(ts->src_tpm_path, tpm_tis_transfer, in tpm_tis_swtpm_test() 41 const TestState *ts = data; in tpm_tis_swtpm_migration_test() local 43 tpm_test_swtpm_migration_test(ts->src_tpm_path, ts->dst_tpm_path, ts->uri, in tpm_tis_swtpm_migration_test() 50 TestState ts = { 0 }; in main() local 54 ts.uri = g_strdup_printf("unix:%s/migsocket", ts.src_tpm_path); in main() 64 tpm_util_rmdir(ts.dst_tpm_path); in main() 65 g_free(ts.dst_tpm_path); in main() 66 tpm_util_rmdir(ts.src_tpm_path); in main() 67 g_free(ts.src_tpm_path); in main() [all …]
|
H A D | m48t59-test.c | 113 time_t ts; in cmos_get_date_time() local 130 ts = time(NULL); in cmos_get_date_time() 131 localtime_r(&ts, &dummy); in cmos_get_date_time() 144 ts = mktime(date); in cmos_get_date_time() 156 time_t ts; in bcd_check_time() local 173 ts = time(NULL); in bcd_check_time() 174 gmtime_r(&ts, &start); in bcd_check_time() 181 ts = time(NULL); in bcd_check_time() 182 gmtime_r(&ts, &end); in bcd_check_time()
|
/qemu/tests/unit/ |
H A D | ptimer-test-stubs.c | 46 ts->cb = cb; in timer_init_full() 47 ts->opaque = opaque; in timer_init_full() 48 ts->scale = scale; in timer_init_full() 50 ts->expire_time = -1; in timer_init_full() 59 if (t->next == ts) { in timer_mod() 66 ts->expire_time = MAX(expire_time * ts->scale, 0); in timer_mod() 67 ts->next = NULL; in timer_mod() 68 t->next = ts; in timer_mod() 71 void timer_del(QEMUTimer *ts) in timer_del() argument 77 if (t->next == ts) { in timer_del() [all …]
|
H A D | test-throttle.c | 30 static ThrottleState ts; variable 162 memset(&ts, 1, sizeof(ts)); in test_init() 166 throttle_init(&ts); in test_init() 194 memset(&ts, 1, sizeof(ts)); in test_init_readonly() 198 throttle_init(&ts); in test_init_readonly() 226 memset(&ts, 1, sizeof(ts)); in test_init_writeonly() 230 throttle_init(&ts); in test_init_writeonly() 254 throttle_init(&ts); in test_destroy() 295 throttle_init(&ts); in test_config_functions() 565 memset(&ts, 0, sizeof(ts)); in test_have_timer() [all …]
|
/qemu/include/qemu/ |
H A D | timer.h | 419 void timer_init_full(QEMUTimer *ts, 523 QEMUTimer *ts = g_new0(QEMUTimer, 1); in timer_new_full() local 525 return ts; in timer_new_full() 610 void timer_deinit(QEMUTimer *ts); 621 void timer_del(QEMUTimer *ts); 632 if (ts) { in timer_free() 633 timer_del(ts); in timer_free() 634 g_free(ts); in timer_free() 698 bool timer_pending(QEMUTimer *ts); 835 struct timespec ts; in get_clock() local [all …]
|
H A D | throttle.h | 123 void throttle_init(ThrottleState *ts); 146 void throttle_config(ThrottleState *ts, 150 void throttle_get_config(ThrottleState *ts, ThrottleConfig *cfg); 155 bool throttle_schedule_timer(ThrottleState *ts, 159 void throttle_account(ThrottleState *ts, ThrottleDirection direction,
|
/qemu/block/ |
H A D | throttle-groups.c | 157 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_unref() 184 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_next_tgm() 223 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in next_throttle_token() 271 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_schedule_timer() 324 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in schedule_next_request() 409 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_restart_queue_entry() 478 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_config() 496 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_get_config() 511 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in timer_cb() 549 ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); in throttle_group_register_tgm() [all …]
|
/qemu/tcg/ |
H A D | tcg.c | 1541 return ts; in tcg_global_alloc() 1559 return ts; in tcg_global_reg_new_internal() 1627 return ts; in tcg_global_mem_new_internal() 1709 return ts; in tcg_temp_new_internal() 4174 if (ts->base_type != ts->type) { in temp_allocate_frame() 4182 ts -= ts->temp_subindex; in temp_allocate_frame() 4264 if (!temp_readonly(ts) && !ts->mem_coherent) { in temp_sync() 4274 && tcg_out_sti(s, ts->type, ts->val, in temp_sync() 4283 tcg_out_st(s, ts->type, ts->reg, in temp_sync() 4442 tcg_out_movi(s, ts->type, reg, ts->val); in temp_load() [all …]
|
H A D | optimize.c | 44 TCGTemp *ts; member 145 return ts_info(ts)->next_copy != ts; in ts_is_copy() 164 ti = ts->state_ptr; in init_ts_info() 199 TCGTemp *ts = mc->ts; in remove_mem_copy() local 230 return ts; in find_better_copy() 233 ret = ts; in find_better_copy() 234 for (i = ts_info(ts)->next_copy; i != ts; i = ts_info(i)->next_copy) { in find_better_copy() 308 ts = find_better_copy(ts); in record_mem_copy() 309 ti = ts_info(ts); in record_mem_copy() 310 mc->ts = ts; in record_mem_copy() [all …]
|
/qemu/bsd-user/ |
H A D | signal.c | 42 return sp - ts->sigaltstack_used.ss_sp < ts->sigaltstack_used.ss_size; in on_sig_stack() 435 ts->sync_signal.info = *info; in queue_signal() 436 ts->sync_signal.pending = sig; in queue_signal() 559 ts->signal_pending = 1; in host_signal_handler() 728 sp = ts->sigaltstack_used.ss_sp + ts->sigaltstack_used.ss_size; in get_sigframe() 802 ts->signal_mask = blocked; in reset_signal_mask() 947 &ts->sigsuspend_mask : &ts->signal_mask; in handle_pending_signal() 997 k = ts->sigtab; in process_pending_signals() 1000 &ts->sigsuspend_mask : &ts->signal_mask; in process_pending_signals() 1018 set = ts->signal_mask; in process_pending_signals() [all …]
|
/qemu/gdbstub/ |
H A D | user-target.c | 207 TaskState *ts = get_task_state(cpu); in gdb_get_cpu_index() local 208 return ts ? ts->ts_tid : -1; in gdb_get_cpu_index() 217 TaskState *ts; in gdb_handle_query_offsets() local 224 ts->info->code_offset, in gdb_handle_query_offsets() 225 ts->info->data_offset, in gdb_handle_query_offsets() 226 ts->info->data_offset); in gdb_handle_query_offsets() 245 TaskState *ts; in gdb_handle_query_xfer_auxv() local 256 saved_auxv = ts->info->saved_auxv; in gdb_handle_query_xfer_auxv() 257 auxv_len = ts->info->auxv_len; in gdb_handle_query_xfer_auxv() 402 TaskState *ts = get_task_state(cpu); in gdb_handle_query_xfer_exec_file() local [all …]
|
/qemu/hw/display/ |
H A D | tcx.c | 214 TCXState *ts = opaque; in tcx_update_display() local 226 s = ts->vram; in tcx_update_display() 239 tcx_draw_line32(ts, d, s, ts->width); in tcx_update_display() 240 if (y >= ts->cursy && y < ts->cursy + 32 && ts->cursx < ts->width) { in tcx_update_display() 241 tcx_draw_cursor32(ts, d, y, ts->width); in tcx_update_display() 277 s = ts->vram; in tcx24_update_display() 278 s24 = ts->vram24; in tcx24_update_display() 279 cptr = ts->cplane; in tcx24_update_display() 292 tcx24_draw_line32(ts, d, s, ts->width, cptr, s24); in tcx24_update_display() 293 if (y >= ts->cursy && y < ts->cursy+32 && ts->cursx < ts->width) { in tcx24_update_display() [all …]
|
/qemu/semihosting/ |
H A D | arm-compat-semi.c | 217 TaskState *ts = get_task_state(cs); in get_swi_errno() local 219 return ts->swi_errno; in get_swi_errno() 229 TaskState *ts = get_task_state(cs); in common_semi_cb() local 230 ts->swi_errno = err; in common_semi_cb() 604 output_size = ts->info->env_strings - ts->info->arg_strings; in do_common_semihosting() 680 if (!ts->heap_limit) { in do_common_semihosting() 683 ts->heap_base = do_brk(0); in do_common_semihosting() 693 ts->heap_limit = limit; in do_common_semihosting() 696 retvals[0] = ts->heap_base; in do_common_semihosting() 697 retvals[1] = ts->heap_limit; in do_common_semihosting() [all …]
|
/qemu/linux-user/riscv/ |
H A D | cpu_loop.c | 100 TaskState *ts = get_task_state(cpu); in target_cpu_copy_regs() local 101 struct image_info *info = ts->info; in target_cpu_copy_regs() 112 ts->stack_base = info->start_stack; in target_cpu_copy_regs() 113 ts->heap_base = info->brk; in target_cpu_copy_regs() 115 ts->heap_limit = 0; in target_cpu_copy_regs()
|
/qemu/net/ |
H A D | dump.c | 59 } ts; member 68 int64_t ts; in dump_receive_iov() local 78 ts = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL); in dump_receive_iov() 81 hdr.ts.tv_sec = ts / 1000000 + s->start_ts; in dump_receive_iov() 82 hdr.ts.tv_usec = ts % 1000000; in dump_receive_iov()
|
/qemu/linux-user/m68k/ |
H A D | cpu_loop.c | 98 TaskState *ts = get_task_state(cpu); in target_cpu_copy_regs() local 99 struct image_info *info = ts->info; in target_cpu_copy_regs() 120 ts->stack_base = info->start_stack; in target_cpu_copy_regs() 121 ts->heap_base = info->brk; in target_cpu_copy_regs() 123 ts->heap_limit = 0; in target_cpu_copy_regs()
|