path: root/src/gallium/auxiliary/os
AgeCommit message (Collapse)AuthorFilesLines
2013-11-15gallium: fix build on GNU/Hurd due to missing PIPE_OS_HURD detectionCyril Brulebois1-6/+6
Thanks to Pino Toscano. Patch from Debian package. Cc: "10.0" <> Reviewed-by: Brian Paul <> (cherry picked from commit 2d77e4f922a8c34541d8b187e171738006bd6f4d)
2013-09-12os: First check for __GLIBC__ and then for PIPE_OS_BSDAndreas Boll1-4/+4
Fixes FTBFS on kfreebsd-* Debian GNU/kFreeBSD doesn't provide getprogname() since it uses stdlib.h from glibc. Instead it provides program_invocation_short_name from glibc. You can find the same order in src/mesa/drivers/dri/common/xmlconfig.c Cc: "9.2" <> Tested-by: Julien Cristau <> Reviewed-by: Brian Paul <>
2013-07-12os: add os_get_process_name() functionBrian Paul2-0/+132
v2: explicitly test for BSD/APPLE, #warning for unexpected environments.
2013-06-26os: add cast in os_time_sleep() to silence MSVC warningBrian Paul1-1/+1
2013-04-23mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke1-4/+5
The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <>
2013-04-23mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke1-1/+1
This brings the license text in line with the MIT License as published on the Open Source Initiative website: Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <>
2013-04-23mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke1-1/+1
Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <>
2013-04-04util: add debug_memory_check_block(), debug_memory_tag()Brian Paul1-0/+6
The former just checks that the given block is valid by checking the header and footer. The later sets the memory block's tag. With extra debug code, we can use that for monitoring/checking particular allocations. Reviewed-by: José Fonseca <>
2012-12-08gallium/os: Fix nano->micro second concersion.José Fonseca1-1/+1
copy'n'paste: best friend, worst enemy.. Trivial.
2012-12-06gallium/os: Cleanup up os_time_get/os_time_get_nano.José Fonseca2-21/+19
- Re-implement os_time_get in terms of os_time_get_nano() for consistency - Use CLOCK_MONOTONIC as recommended - Only use clock_gettime on Linux for now. Reviewed-by: Brian Paul <>
2012-12-06gallium/os: Fix os_time_sleep() on Windows for small durations.José Fonseca1-1/+5
Prevents undetermined sleeps. Reviewed-by: Brian Paul <>
2012-12-03llvmpipe: Implement PIPE_QUERY_TIMESTAMP and PIPE_QUERY_TIME_ELAPSED.James Benton2-0/+22
This required an update for the query storage in llvmpipe, there can now be an active query per query type, so an occlusion query can run at the same time as a time elapsed query. Based on PIPE_QUERY_TIME_ELAPSED patch from Dave Airlie. v2: fix up piglits for timers (also from Dave Airlie) a) if we don't render anything the result is 0, so just return the current time b) add missing screen get_timestamp callback. Signed-off-by: Dave Airlie <> Signed-off-by: José Fonseca <>
2012-11-28util: add more memory debugging featuresBrian Paul1-0/+3
Add a DEBUG_FREED_MEMORY option to help catch use-after-free errors. Add debug_memory_check() function which can be periodically called to check that all known blocks are good. Reviewed-by: José Fonseca <>
2012-05-25util: add GALLIUM_LOG_FILE option for logging output to a fileBrian Paul1-3/+22
Useful for logging different runs to files and diffing, etc.
2012-05-05auxiliary/os: Add missing signal.h include.Baldo Davide1-0/+1
The signal.h include was missed in the commit bc16c73407d11bb6702cf7de9925bfaeb80a5272 which leads to broken compilations under Linux. Signed-off-by: José Fonseca <>
2011-12-27gallium: use Mesa pthread_barrier_t on Haiku, as it is incomplete under HaikuAlexander von Gluck1-1/+1
Reviewed-by: Brian Paul <> Signed-off-by: Brian Paul <>
2011-11-29Remove windows kernel support code.José Fonseca5-293/+6
Not actively used. Reviewed-by: Brian Paul <>
2011-11-29gallium/auxiliary: Remove os_stream.José Fonseca6-652/+0
XP kernel mode was the only subsystem lacking stdio FILES. Reviewed-by: Brian Paul <>
2011-08-24auxiliary/os: add wrappers for mmap/munmapChia-I Wu1-0/+87
The use of mmap() in winsys requires large file support. Not all OSes have LFS so a wrapper should be used. In particular, os_mmap() should call __mmap2() on Android.
2011-08-21gallium: add PIPE_OS_ANDROID supportChia-I Wu1-1/+1
Android uses Linux kernel and its own C runtime. It resembles PIPE_OS_LINUX a lot with some minor exceptions. Reviewed-by: Brian Paul <>
2011-06-17scons: make embedding orthogonal to the platformJosé Fonseca4-16/+7
To enable embedding in platforms other than linux.
2011-05-16gallium: block signals for new thread when spawning threadsDave Airlie1-1/+8
I'm hard pressed to think of any reason a gallium thread would want to receive a signal, especially considering its probably loaded as a library and you don't want the threads interfering with the main threads signal handling. This solves a problem loading llvmpipe into the X server for AIGLX, where the X server relies on the SIGIO signal going to the main thread, but once llvmpipe loads the SIGIO can end up in any of its threads. Signed-off-by: Dave Airlie <>
2011-04-27os: simplify ifdefnobled1-1/+1
The actual code that needs this include is just using "if defined (PIPE_OS_UNIX)", and the two conditions should match. This should also make the file compile under Hurd.
2011-03-06os: Fix pipe_static_mutex on Windows.José Fonseca1-1/+2
2010-11-08os: Open file streams in binary mode.Michal Krol1-1/+1
Otherwise we'll get garbled data on Windows.
2010-08-21auxiliary: add copyright headersLuca Barbieri1-0/+26
Thanks to Jose Fonseca for pointing out they were missing.
2010-08-21os_stream: fix bugs in allocation pathLuca Barbieri1-16/+8
2010-08-20os_stream: add printf facilityLuca Barbieri6-3/+83
2010-07-12os: remove gratuitous pipe_barrier placeholder codenobled1-21/+1
There's already an implementation of pipe_barrier using the other pipe_* primitives; just use that on Windows, too. Now Windows passes pipe_barrier_test.
2010-07-12os, rbug: remove PIPE_THREAD_HAVE_CONDVARnobled1-1/+0
The new default implementation of pipe_condvar makes it unnecessary.
2010-07-12os: Implement pipe_condvar on Windows Vista and laternobled1-0/+30
Unfortunately compiling with these defines enabled would mean Gallium can't run on Windows XP/2003 or older. Todo: Need a macro to declare if we don't care about WinXP compatibililty.
2010-07-12os: Implement pipe_condvar on win32nobled1-7/+27
Or at least a little of it. This version will sleep for a fixed amount of time instead of just deadlocking, which is a slight improvement. Also do the same thing on any unrecognized platform.
2010-05-13gallium: Add tokens for Cygwin.Vinson Lee2-6/+6
2010-04-26os: Check for spurious wakeups in pipe_barrier_wait.Vinson Lee1-1/+8
The POSIX function pthread_cond_wait can have spurious wakeups when waiting on a condition variable. Add a 64-bit counter that is incremented whenever the barrier becomes full. A woken thread checks the counter. If the counter has not changed then it has been spuriously woken and goes back to sleep. If the counter has changed then it was properly signaled and exits the barrier. Tested on Mac OS X. This patch was based on ideas from Luca Barbieri.
2010-04-17os: Implement pipe_barrier for POSIX platforms without pthread_barrier_t.Vinson Lee1-5/+26
This patch was tested on Mac OS X.
2010-03-31os: Temporarily use posix thread for embedded too.Kurt Daverman1-6/+6
2010-03-15gallivm/llvmpipe: rename os_llvm.h to lp_bld.hBrian Paul1-47/+0
The llvm wrapper wasn't really an OS thing. Use lp_bld.h for now but we eventually should rename/re-prefix all the files/functions in the gallivm/ directory.
2010-03-12Merge branch '7.8'Michel Dänzer1-1/+1
2010-03-12Grammar and spelling fixesJeff Smith1-1/+1
Signed-off-by: Jeff Smith <> Signed-off-by: Brian Paul <>
2010-03-11gallium/os: wrapper for llvm-c/Core.h and #define HAVE_LLVM if neededBrian Paul1-0/+47
2010-02-14os: A stream for debug logging.José Fonseca4-2/+87
Just a wrapper around os_log_message. Although it would probably make more sense to be the other way around. Also some comment fixes.
2010-02-14os: Add a growable string stream.José Fonseca2-0/+177
2010-02-14os: Complement/improve stream inline helpers.José Fonseca1-0/+17
2010-02-14os: Fix bad calloc.José Fonseca1-10/+1
2010-02-14os: Make streams abstract.José Fonseca4-262/+158
Also replace windows kernel stream with null implementation. It was severely limited and no easy means to test it now.
2010-02-10os: Do not use Pthreads barrier functions on Mac OS X.Vinson Lee1-42/+52
Pthreads barrier functions are not available on some POSIX platforms.
2010-02-05os: Don't assert on missing implementation of barrier init/destroy. Just usage.José Fonseca1-2/+0
2010-02-05Merge remote branch 'origin/lp-binning'José Fonseca1-7/+144
Conflicts: src/gallium/auxiliary/util/u_dl.c src/gallium/auxiliary/util/u_time.h src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_surface.c src/gallium/drivers/llvmpipe/lp_tex_cache.c src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-02-04auxiliary: util_stream -> os_streamJosé Fonseca3-0/+388
2010-02-04os: Ensure header includes are outside extern "C" {}.José Fonseca1-2/+6