diff options
author | Nicolai Hähnle <[email protected]> | 2017-10-22 17:38:44 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-11-09 11:57:21 +0100 |
commit | 222a2fb99859f3ac237def59d40413bb1a464f11 (patch) | |
tree | e29bdd5a50afc58290496c87cf1541f1cc5426f4 /src | |
parent | f76a6cb337f979fb26d3233d7e0ff208ec8885bb (diff) |
util: move os_time.[ch] to src/util
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
57 files changed, 76 insertions, 78 deletions
diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources index 0502a2c44f8..4fb7a30613a 100644 --- a/src/gallium/auxiliary/Makefile.sources +++ b/src/gallium/auxiliary/Makefile.sources @@ -83,8 +83,6 @@ C_SOURCES := \ os/os_process.c \ os/os_process.h \ os/os_thread.h \ - os/os_time.c \ - os/os_time.h \ pipebuffer/pb_buffer_fenced.c \ pipebuffer/pb_buffer_fenced.h \ pipebuffer/pb_buffer.h \ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index c456a97eb62..6ddc509a813 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -32,7 +32,7 @@ #include "util/u_debug.h" #include "util/u_memory.h" #include "util/simple_list.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "lp_bld.h" #include "lp_bld_debug.h" #include "lp_bld_misc.h" diff --git a/src/gallium/auxiliary/hud/hud_cpu.c b/src/gallium/auxiliary/hud/hud_cpu.c index 4caaab6977e..581dad6df04 100644 --- a/src/gallium/auxiliary/hud/hud_cpu.c +++ b/src/gallium/auxiliary/hud/hud_cpu.c @@ -29,7 +29,7 @@ */ #include "hud/hud_private.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "os/os_thread.h" #include "util/u_memory.h" #include "util/u_queue.h" diff --git a/src/gallium/auxiliary/hud/hud_cpufreq.c b/src/gallium/auxiliary/hud/hud_cpufreq.c index abb930d7e28..2b881a850e3 100644 --- a/src/gallium/auxiliary/hud/hud_cpufreq.c +++ b/src/gallium/auxiliary/hud/hud_cpufreq.c @@ -35,7 +35,7 @@ #include "hud/hud_private.h" #include "util/list.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "os/os_thread.h" #include "util/u_memory.h" #include <stdio.h> diff --git a/src/gallium/auxiliary/hud/hud_diskstat.c b/src/gallium/auxiliary/hud/hud_diskstat.c index df86abd12d8..53b32baef22 100644 --- a/src/gallium/auxiliary/hud/hud_diskstat.c +++ b/src/gallium/auxiliary/hud/hud_diskstat.c @@ -34,7 +34,7 @@ #include "hud/hud_private.h" #include "util/list.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "os/os_thread.h" #include "util/u_memory.h" #include <stdio.h> diff --git a/src/gallium/auxiliary/hud/hud_driver_query.c b/src/gallium/auxiliary/hud/hud_driver_query.c index 76104b5b497..8b1e4e104a7 100644 --- a/src/gallium/auxiliary/hud/hud_driver_query.c +++ b/src/gallium/auxiliary/hud/hud_driver_query.c @@ -33,7 +33,7 @@ #include "hud/hud_private.h" #include "pipe/p_screen.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_math.h" #include "util/u_memory.h" #include <stdio.h> diff --git a/src/gallium/auxiliary/hud/hud_fps.c b/src/gallium/auxiliary/hud/hud_fps.c index 8aa7a665a30..aecbaf0f6b4 100644 --- a/src/gallium/auxiliary/hud/hud_fps.c +++ b/src/gallium/auxiliary/hud/hud_fps.c @@ -29,7 +29,7 @@ */ #include "hud/hud_private.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_memory.h" struct fps_info { diff --git a/src/gallium/auxiliary/hud/hud_nic.c b/src/gallium/auxiliary/hud/hud_nic.c index 835f92e2e04..bb29a90dbca 100644 --- a/src/gallium/auxiliary/hud/hud_nic.c +++ b/src/gallium/auxiliary/hud/hud_nic.c @@ -34,7 +34,7 @@ #include "hud/hud_private.h" #include "util/list.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "os/os_thread.h" #include "util/u_memory.h" #include <stdio.h> diff --git a/src/gallium/auxiliary/hud/hud_sensors_temp.c b/src/gallium/auxiliary/hud/hud_sensors_temp.c index 29ee257ce86..7ae6f71b55c 100644 --- a/src/gallium/auxiliary/hud/hud_sensors_temp.c +++ b/src/gallium/auxiliary/hud/hud_sensors_temp.c @@ -31,7 +31,7 @@ #include "hud/hud_private.h" #include "util/list.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "os/os_thread.h" #include "util/u_memory.h" #include <stdio.h> diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build index 948fb86b3b2..d8fdd3510f1 100644 --- a/src/gallium/auxiliary/meson.build +++ b/src/gallium/auxiliary/meson.build @@ -103,8 +103,6 @@ files_libgallium = files( 'os/os_process.c', 'os/os_process.h', 'os/os_thread.h', - 'os/os_time.c', - 'os/os_time.h', 'pipebuffer/pb_buffer_fenced.c', 'pipebuffer/pb_buffer_fenced.h', 'pipebuffer/pb_buffer.h', diff --git a/src/gallium/auxiliary/util/u_time.h b/src/gallium/auxiliary/util/u_time.h index a5017d6bce2..99fa1400511 100644 --- a/src/gallium/auxiliary/util/u_time.h +++ b/src/gallium/auxiliary/util/u_time.h @@ -38,7 +38,7 @@ #include "pipe/p_config.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "pipe/p_compiler.h" diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c index aec9332d903..a15801beb1d 100644 --- a/src/gallium/drivers/ddebug/dd_draw.c +++ b/src/gallium/drivers/ddebug/dd_draw.c @@ -35,7 +35,7 @@ #include "util/u_memory.h" #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_scan.h" -#include "os/os_time.h" +#include "util/os_time.h" #include <inttypes.h> diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c index dd9bac38501..2e65065b285 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c @@ -25,7 +25,7 @@ * Christian Gmeiner <[email protected]> */ -#include "os/os_time.h" +#include "util/os_time.h" #include "pipe/p_state.h" #include "util/u_memory.h" #include "util/u_string.h" diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index b0c4b7ba471..30beb412d9d 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -38,7 +38,7 @@ #include "etnaviv_resource.h" #include "etnaviv_translate.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_math.h" #include "util/u_memory.h" #include "util/u_string.h" diff --git a/src/gallium/drivers/freedreno/freedreno_query_sw.c b/src/gallium/drivers/freedreno/freedreno_query_sw.c index dfa89872397..50965161146 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_sw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_sw.c @@ -30,7 +30,7 @@ #include "util/u_string.h" #include "util/u_memory.h" #include "util/u_inlines.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "freedreno_query_sw.h" #include "freedreno_context.h" diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index e5504b6b386..5bb1e20c780 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -38,7 +38,7 @@ #include "util/u_string.h" #include "util/u_debug.h" -#include "os/os_time.h" +#include "util/os_time.h" #include <stdio.h> #include <errno.h> diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index 7b81903b413..ad11d8ca53f 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -33,7 +33,7 @@ #include "draw/draw_context.h" #include "pipe/p_defines.h" #include "util/u_memory.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "lp_context.h" #include "lp_flush.h" #include "lp_fence.h" diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 9e2780ca1d7..939944aa791 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -34,7 +34,7 @@ #include "util/u_string.h" #include "util/u_thread.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "lp_scene_queue.h" #include "lp_context.h" diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index ee377dc61f8..bd5876994d3 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -38,7 +38,7 @@ #include "gallivm/lp_bld_type.h" #include "os/os_misc.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "lp_texture.h" #include "lp_fence.h" #include "lp_jit.h" diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 2be6fc033d1..c1573231335 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -41,7 +41,7 @@ #include "util/u_pack_color.h" #include "util/u_viewport.h" #include "draw/draw_pipe.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "lp_context.h" #include "lp_memory.h" #include "lp_scene.h" diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 9223ce63e3a..0daf7aecf6e 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -67,7 +67,7 @@ #include "util/u_string.h" #include "util/simple_list.h" #include "util/u_dual_blend.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "pipe/p_shader_tokens.h" #include "draw/draw_context.h" #include "tgsi/tgsi_dump.h" diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c index 6b0df21b8ad..77c7ac1bbde 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c @@ -29,7 +29,7 @@ #include "util/u_math.h" #include "util/u_memory.h" #include "util/simple_list.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "gallivm/lp_bld_arit.h" #include "gallivm/lp_bld_bitarit.h" #include "gallivm/lp_bld_const.h" diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c index 6c299cbc6a5..d14c59b2dd1 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.c +++ b/src/gallium/drivers/nouveau/nouveau_fence.c @@ -23,7 +23,7 @@ #include "nouveau_screen.h" #include "nouveau_winsys.h" #include "nouveau_fence.h" -#include "os/os_time.h" +#include "util/os_time.h" #ifdef PIPE_OS_UNIX #include <sched.h> diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index ea68809c6e8..c144b39b2dd 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -8,7 +8,7 @@ #include "util/u_format_s3tc.h" #include "util/u_string.h" -#include "os/os_time.h" +#include "util/os_time.h" #include <stdio.h> #include <errno.h> diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 6f4231d76e3..b55fb63f000 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -26,7 +26,7 @@ #include "util/u_sampler.h" #include "util/simple_list.h" #include "util/u_upload_mgr.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "vl/vl_decoder.h" #include "vl/vl_video_buffer.h" diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index 54108d1cdfb..7fabd13f3d7 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -27,7 +27,7 @@ #include "util/simple_list.h" #include "util/u_upload_mgr.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "r300_context.h" #include "r300_cs.h" diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 72ba0ff84e3..b9b2d7d8382 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -24,7 +24,7 @@ #include "util/u_format.h" #include "util/u_format_s3tc.h" #include "util/u_memory.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "vl/vl_decoder.h" #include "vl/vl_video_buffer.h" diff --git a/src/gallium/drivers/r600/r600_gpu_load.c b/src/gallium/drivers/r600/r600_gpu_load.c index c15fb9dfa06..a2de8cc71a4 100644 --- a/src/gallium/drivers/r600/r600_gpu_load.c +++ b/src/gallium/drivers/r600/r600_gpu_load.c @@ -36,7 +36,7 @@ #include "r600_pipe_common.h" #include "r600_query.h" -#include "os/os_time.h" +#include "util/os_time.h" /* For good accuracy at 1000 fps or lower. This will be inaccurate for higher * fps (there are too few samples per frame). */ diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index e639d928830..2381c5b7d00 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -39,7 +39,7 @@ #include "vl/vl_video_buffer.h" #include "radeon_video.h" #include "radeon_uvd.h" -#include "os/os_time.h" +#include "util/os_time.h" static const struct debug_named_value r600_debug_options[] = { /* features */ diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index acad670d6fa..e2d0e32bb2b 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -32,7 +32,7 @@ #include "util/u_memory.h" #include "util/u_format_s3tc.h" #include "util/u_upload_mgr.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "vl/vl_decoder.h" #include "vl/vl_video_buffer.h" #include "radeon_video.h" diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c index aa3e36f56f7..9c17c3ba23e 100644 --- a/src/gallium/drivers/r600/r600_query.c +++ b/src/gallium/drivers/r600/r600_query.c @@ -27,7 +27,7 @@ #include "r600_cs.h" #include "util/u_memory.h" #include "util/u_upload_mgr.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "tgsi/tgsi_text.h" #define R600_MAX_STREAMS 4 diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index b8411144900..3515d979d9e 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -32,7 +32,7 @@ #include "util/u_memory.h" #include "util/u_pack_color.h" #include "util/u_surface.h" -#include "os/os_time.h" +#include "util/os_time.h" #include <errno.h> #include <inttypes.h> diff --git a/src/gallium/drivers/r600/sb/sb_core.cpp b/src/gallium/drivers/r600/sb/sb_core.cpp index afea8188f1c..cdc2862d36d 100644 --- a/src/gallium/drivers/r600/sb/sb_core.cpp +++ b/src/gallium/drivers/r600/sb/sb_core.cpp @@ -26,7 +26,7 @@ #define SB_RA_SCHED_CHECK DEBUG -#include "os/os_time.h" +#include "util/os_time.h" #include "r600_pipe.h" #include "r600_shader.h" diff --git a/src/gallium/drivers/radeon/r600_gpu_load.c b/src/gallium/drivers/radeon/r600_gpu_load.c index ccbd1c91864..411dcfe8724 100644 --- a/src/gallium/drivers/radeon/r600_gpu_load.c +++ b/src/gallium/drivers/radeon/r600_gpu_load.c @@ -33,7 +33,7 @@ #include "r600_pipe_common.h" #include "r600_query.h" -#include "os/os_time.h" +#include "util/os_time.h" /* For good accuracy at 1000 fps or lower. This will be inaccurate for higher * fps (there are too few samples per frame). */ diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index c9502182a7e..5d8214118a1 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -29,7 +29,7 @@ #include "util/u_memory.h" #include "util/u_format_s3tc.h" #include "util/u_upload_mgr.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "vl/vl_decoder.h" #include "vl/vl_video_buffer.h" #include "radeon/radeon_video.h" diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index aedf950ff2d..0a03061ab91 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -26,7 +26,7 @@ #include "r600_cs.h" #include "util/u_memory.h" #include "util/u_upload_mgr.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "tgsi/tgsi_text.h" #include "amd/common/sid.h" diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 0800c0f1d1c..258690cadf5 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -28,7 +28,7 @@ #include "util/u_memory.h" #include "util/u_pack_color.h" #include "util/u_surface.h" -#include "os/os_time.h" +#include "util/os_time.h" #include <errno.h> #include <inttypes.h> #include "state_tracker/drm_driver.h" diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c index 82bcef8d03b..8eb39c17b14 100644 --- a/src/gallium/drivers/rbug/rbug_core.c +++ b/src/gallium/drivers/rbug/rbug_core.c @@ -33,7 +33,7 @@ #include "util/u_memory.h" #include "util/simple_list.h" #include "util/u_network.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "tgsi/tgsi_parse.h" diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index 267c99977fe..5c9afe6fe47 100644 --- a/src/gallium/drivers/softpipe/sp_query.c +++ b/src/gallium/drivers/softpipe/sp_query.c @@ -30,7 +30,7 @@ */ #include "draw/draw_context.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "pipe/p_defines.h" #include "util/u_memory.h" #include "sp_context.h" diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 356ebf4e833..08efd14fbe0 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -31,7 +31,7 @@ #include "util/u_format_s3tc.h" #include "util/u_video.h" #include "os/os_misc.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "pipe/p_defines.h" #include "pipe/p_screen.h" #include "draw/draw_context.h" diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index 0d695a64927..80c59c05e86 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -31,7 +31,7 @@ #include "pipe/p_defines.h" #include "pipe/p_state.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_blitter.h" #include "util/list.h" diff --git a/src/gallium/drivers/swr/swr_fence.cpp b/src/gallium/drivers/swr/swr_fence.cpp index abf1d0c69c8..3005eb9aaad 100644 --- a/src/gallium/drivers/swr/swr_fence.cpp +++ b/src/gallium/drivers/swr/swr_fence.cpp @@ -23,7 +23,7 @@ #include "pipe/p_screen.h" #include "util/u_memory.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "swr_context.h" #include "swr_screen.h" diff --git a/src/gallium/drivers/swr/swr_query.cpp b/src/gallium/drivers/swr/swr_query.cpp index e3697304e05..ea31de630b3 100644 --- a/src/gallium/drivers/swr/swr_query.cpp +++ b/src/gallium/drivers/swr/swr_query.cpp @@ -23,7 +23,7 @@ #include "pipe/p_defines.h" #include "util/u_memory.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "swr_context.h" #include "swr_fence.h" #include "swr_query.h" diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c index 2003222cc1c..49349496ac6 100644 --- a/src/gallium/drivers/trace/tr_dump.c +++ b/src/gallium/drivers/trace/tr_dump.c @@ -45,7 +45,7 @@ #include "pipe/p_compiler.h" #include "os/os_thread.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_debug.h" #include "util/u_memory.h" #include "util/u_string.h" diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 56520156891..1646e7ee025 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -24,7 +24,7 @@ #include "util/u_format.h" #include "util/u_format_s3tc.h" #include "util/u_video.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "pipe/p_defines.h" #include "pipe/p_screen.h" diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c index 06b5c8da3c2..7348ea3ba88 100644 --- a/src/gallium/state_trackers/wgl/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c @@ -30,7 +30,7 @@ #include "pipe/p_screen.h" #include "util/u_memory.h" #include "hud/hud_context.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "state_tracker/st_api.h" #include "stw_icd.h" diff --git a/src/gallium/tests/unit/pipe_barrier_test.c b/src/gallium/tests/unit/pipe_barrier_test.c index 6bd46b8d964..838c9bfd96c 100644 --- a/src/gallium/tests/unit/pipe_barrier_test.c +++ b/src/gallium/tests/unit/pipe_barrier_test.c @@ -36,8 +36,9 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_atomic.h" #include "util/u_thread.h" diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index d0395a938ce..c3e97c22861 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -27,7 +27,7 @@ #include "amdgpu_cs.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "state_tracker/drm_driver.h" #include <amdgpu_drm.h> #include <xf86drm.h> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 0f36cc5ae63..0a3f0fd6016 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -27,7 +27,8 @@ */ #include "amdgpu_cs.h" -#include "os/os_time.h" +#include "util/os_time.h" +#include <inttypes.h> #include <stdio.h> #include "amd/common/sid.h" diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 15e9d38e33a..b4e501c817f 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -31,7 +31,7 @@ #include "util/simple_list.h" #include "os/os_thread.h" #include "os/os_mman.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "state_tracker/drm_driver.h" diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 2b1542fcf48..7220f3a0240 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -56,7 +56,7 @@ #include "radeon_drm_cs.h" #include "util/u_memory.h" -#include "os/os_time.h" +#include "util/os_time.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 7f542e7f1ff..71e652ebf31 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -28,7 +28,7 @@ #include <sys/stat.h> #include "os/os_mman.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "util/u_memory.h" #include "util/u_format.h" #include "util/u_hash_table.h" diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index 404ba58b08d..d76be4d5d32 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -24,7 +24,7 @@ #include "util/u_memory.h" #include "util/u_format.h" #include "util/u_inlines.h" -#include "os/os_time.h" +#include "util/os_time.h" #include "state_tracker/sw_winsys.h" #include "virgl_vtest_winsys.h" diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources index f8096feb232..104ecae8ed3 100644 --- a/src/util/Makefile.sources +++ b/src/util/Makefile.sources @@ -22,6 +22,8 @@ MESA_UTIL_FILES := \ macros.h \ mesa-sha1.c \ mesa-sha1.h \ + os_time.c \ + os_time.h \ sha1/sha1.c \ sha1/sha1.h \ ralloc.c \ diff --git a/src/util/meson.build b/src/util/meson.build index a9ab5bf545c..ac86c9e111e 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -46,6 +46,8 @@ files_mesa_util = files( 'macros.h', 'mesa-sha1.c', 'mesa-sha1.h', + 'os_time.c', + 'os_time.h', 'sha1/sha1.c', 'sha1/sha1.h', 'ralloc.c', diff --git a/src/gallium/auxiliary/os/os_time.c b/src/util/os_time.c index e4a1cae641a..8d8291ff173 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/util/os_time.c @@ -32,8 +32,11 @@ * @author Jose Fonseca <[email protected]> */ +#include "os_time.h" + +/* TODO: fix this dependency */ +#include "gallium/include/pipe/p_config.h" -#include "pipe/p_defines.h" #include "util/u_atomic.h" #if defined(PIPE_OS_UNIX) @@ -47,8 +50,6 @@ # error Unsupported OS #endif -#include "os_time.h" - int64_t os_time_get_nano(void) @@ -121,15 +122,15 @@ os_time_get_absolute_timeout(uint64_t timeout) int64_t time, abs_timeout; /* Also check for the type upper bound. */ - if (timeout == PIPE_TIMEOUT_INFINITE || timeout > INT64_MAX) - return PIPE_TIMEOUT_INFINITE; + if (timeout == OS_TIMEOUT_INFINITE || timeout > INT64_MAX) + return OS_TIMEOUT_INFINITE; time = os_time_get_nano(); abs_timeout = time + (int64_t)timeout; /* Check for overflow. */ if (abs_timeout < time) - return PIPE_TIMEOUT_INFINITE; + return OS_TIMEOUT_INFINITE; return abs_timeout; } @@ -144,7 +145,7 @@ os_wait_until_zero(volatile int *var, uint64_t timeout) if (!timeout) return false; - if (timeout == PIPE_TIMEOUT_INFINITE) { + if (timeout == OS_TIMEOUT_INFINITE) { while (p_atomic_read(var)) { #if defined(PIPE_OS_UNIX) sched_yield(); @@ -175,8 +176,8 @@ os_wait_until_zero_abs_timeout(volatile int *var, int64_t timeout) if (!p_atomic_read(var)) return true; - if (timeout == PIPE_TIMEOUT_INFINITE) - return os_wait_until_zero(var, PIPE_TIMEOUT_INFINITE); + if (timeout == OS_TIMEOUT_INFINITE) + return os_wait_until_zero(var, OS_TIMEOUT_INFINITE); while (p_atomic_read(var)) { if (os_time_get_nano() >= timeout) diff --git a/src/gallium/auxiliary/os/os_time.h b/src/util/os_time.h index ca0bdd5a0c4..049ab118db2 100644 --- a/src/gallium/auxiliary/os/os_time.h +++ b/src/util/os_time.h @@ -35,20 +35,15 @@ #ifndef _OS_TIME_H_ #define _OS_TIME_H_ - -#include "pipe/p_config.h" - -#if defined(PIPE_OS_UNIX) -# include <unistd.h> /* usleep */ -#endif - -#include "pipe/p_compiler.h" - +#include <stdbool.h> +#include <stdint.h> #ifdef __cplusplus extern "C" { #endif +/* must be equal to PIPE_TIMEOUT_INFINITE */ +#define OS_TIMEOUT_INFINITE 0xffffffffffffffffull /* * Get the current time in nanoseconds from an unknown base. @@ -79,7 +74,7 @@ os_time_sleep(int64_t usecs); * * Returns true if the current time has elapsed beyond the specified interval. */ -static inline boolean +static inline bool os_time_timeout(int64_t start, int64_t end, int64_t curr) @@ -95,8 +90,8 @@ os_time_timeout(int64_t start, * Convert a relative timeout in nanoseconds into an absolute timeout, * in other words, it returns current time + timeout. * os_time_get_nano() must be monotonic. - * PIPE_TIMEOUT_INFINITE is passed through unchanged. If the calculation - * overflows, PIPE_TIMEOUT_INFINITE is returned. + * OS_TIMEOUT_INFINITE is passed through unchanged. If the calculation + * overflows, OS_TIMEOUT_INFINITE is returned. */ int64_t os_time_get_absolute_timeout(uint64_t timeout); @@ -107,7 +102,7 @@ os_time_get_absolute_timeout(uint64_t timeout); * * \param var variable * \param timeout timeout in ns, can be anything from 0 (no wait) to - * PIPE_TIME_INFINITE (wait forever) + * OS_TIMEOUT_INFINITE (wait forever) * \return true if the variable is zero */ bool @@ -118,7 +113,7 @@ os_wait_until_zero(volatile int *var, uint64_t timeout); * Wait until the variable at the given memory location is zero. * The timeout is the absolute time when the waiting should stop. If it is * less than or equal to the current time, it only returns the status and - * doesn't wait. PIPE_TIME_INFINITE waits forever. This requires that + * doesn't wait. OS_TIMEOUT_INFINITE waits forever. This requires that * os_time_get_nano is monotonic. * * \param var variable |