summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os
Commit message (Collapse)AuthorAgeFilesLines
* os: s/Elements/ARRAY_SIZE/Brian Paul2016-04-271-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* os: check for GALLIUM_PROCESS_NAME to override os_get_process_name()Brian Paul2015-11-191-18/+29
| | | | | | | Useful for debugging and for glretrace. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* auxiliary/os: Don't implement os_get_option() on embedded builds.José Fonseca2015-09-011-0/+2
| | | | | | | | Let it be defined externally instead, allowing setting mechanisms other than environment variables. Reviewed-by: Zack Rusin <[email protected]> Reviewed-by: Matthew McClure <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-215-24/+24
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* gallium/os: minor whitespace fixes in os_time.hBrian Paul2015-07-071-5/+6
| | | | Trivial.
* gallium/os: add conversion and wait functions for absolute timeoutsMarek Olšák2015-07-052-0/+67
| | | | | | | | Absolute timeouts are used with the amdgpu kernel driver. It also makes waiting for several variables and fences at the same time easier (the timeout doesn't have to be recalculated after every wait call). Reviewed-by: Alex Deucher <[email protected]>
* gallium/os: add os_wait_until_zero (v2)Marek Olšák2015-07-052-1/+48
| | | | | | | | | | This will be used by radeon and amdgpu winsyses. Copied from the amdgpu winsys. v2: use volatile and p_atomic_read Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* os/os_memory_aligned.h: Handle integer overflow.Jose Fonseca2015-04-231-1/+27
| | | | | | | | | | | This code is only used when our memory debugging wrappers are enabled, as we use the C runtime functions directly elsewhere. Tested llvmpipe on Windows w/ memory debugging enabled. VMware PR894263. Reviewed-by: Roland Scheidegger <[email protected]>
* android: fix the building rules for Android 5.0Chih-Wei Huang2015-04-221-1/+1
| | | | | | | | | | | | | | | | | Android 5.0 allows modules to generate source into $OUT/gen, which will then be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as necessary. Modules will need to change calls to local-intermediates-dir into local-generated-sources-dir. The patch changes local-intermediates-dir into local-generated-sources-dir. If the Android version is less than 5.0, fallback to local-intermediates-dir. The patch also fixes the 64-bit building issue of Android 5.0. v2 [Emil Velikov] - Keep the LOCAL_UNSTRIPPED_PATH variable. Signed-off-by: Chih-Wei Huang <[email protected]>
* auxiliary/os: fix the android build - s/drm_munmap/os_munmap/Emil Velikov2015-03-161-2/+2
| | | | | | | | | Squash this silly typo introduced with commit c63eb5dd5ec(auxiliary/os: get the mmap/munmap wrappers working with android) Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* auxilary/os: correct sysctl use in os_get_total_physical_memory()Jonathan Gray2015-02-271-2/+2
| | | | | | | | | | | | | The length argument passed to sysctl was the size of the pointer not the type. The result of this is sysctl calls would fail on 32 bit BSD/Mac OS X. Additionally the wrong pointer was passed as an argument to store the result of the sysctl call. Cc: "10.4, 10.5" <[email protected]> Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* os,llvmpipe: Set rasterizer thread names on Linux.Jose Fonseca2015-02-131-0/+11
| | | | | | | | | | | To help identify llvmpipe rasterizer threads -- especially when there can be so many. We can eventually generalize this to other OSes, but for that we must restrict the function to be called from the current thread. See also http://stackoverflow.com/a/7989973 Reviewed-by: Roland Scheidegger <[email protected]>
* auxiliary/os: get the mmap/munmap wrappers working with androidEmil Velikov2014-10-231-5/+12
| | | | | | | | | | - Use macro for munmap under Android - the STATIC_ASSERT uses a off_t which is not used under Android for mmap. As loff_t size does not vary as does off_t just ignore the assert. - Wrap the long lines to improve readability. Signed-off-by: Emil Velikov <[email protected]>
* auxilary/os: Add DragonFly BSD support in os_get_total_physical_memory.Vinson Lee2014-10-131-0/+2
| | | | | | | | | | | This patch fixes this build error on DragonFly BSD. CC os/os_misc.lo os/os_misc.c: In function 'os_get_total_physical_memory': os/os_misc.c:132:2: error: #error Unsupported *BSD Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* configure.ac: Add AC_SYS_LARGEFILEMichel Dänzer2014-09-051-4/+9
| | | | | | | Making sure large file support is enabled across the tree even on 32-bit systems. Reviewed-by: Emil Velikov <[email protected]>
* auxilary/os: Add Solaris support in os_get_total_physical_memory.Vinson Lee2014-08-221-2/+2
| | | | | | | | | | The patch fixes the build on Oracle Solaris. CC os/os_misc.lo "os/os_misc.c", line 59: #error: unexpected platform in os_sysinfo.c Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Teach os_get_total_physical_memory about CygwinJon TURNEY2014-08-201-2/+2
| | | | | Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/aux: Fill in Haiku get process name codeAlexander von Gluck IV2014-08-191-0/+7
| | | | Acked-by: Brian Paul <[email protected]>
* auxiliary/os: introduce os_get_total_physical_memory helper functionEmil Velikov2014-08-152-0/+71
| | | | | Cc: Alexander von Gluck IV <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* os_process.c: Add cygwin as an expected platformYaakov Selkowitz2014-07-291-2/+2
| | | | | | | | | | | mesa/mesa/src/gallium/auxiliary/os/os_process.c:40:2: warning: #warning unexpected platform in os_process.c [-Wcpp] #warning unexpected platform in os_process.c mesa/mesa/src/gallium/auxiliary/os/os_process.c:77:2: warning: #warning unexpected platform in os_process.c [-Wcpp] #warning unexpected platform in os_process.c Signed-off-by: Yaakov Selkowitz <[email protected]> Reviewed-by: Jon TURNEY <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* auxiliary/os,auxiliary/util: Fix the `‘noreturn’ function does return` ↵José Fonseca2014-04-171-1/+1
| | | | | | | | | | | | | | | | warning. Now that _debug_assert_fail() has the noreturn attribute, it is better that execution truly never returns. Not just for sake of silencing the warning, but because the code at the return IP address may be invalid or lead to inconsistent results. This removes support for the GALLIUM_ABORT_ON_ASSERT debugging environment variable, but between the usefulness of GALLIUM_ABORT_ON_ASSERT and better static code analysis I think better static code analysis wins. Reviewed-by: Brian Paul <[email protected]>
* os/os_thread: Revert pipe_barrier pre-processing logic.José Fonseca2014-01-231-1/+1
| | | | | Whitelist platforms instead of blacklisting, as several pthread implementations are missing pthread_barrier_t, in particular MacOSX.
* gallium: Use C11 thread abstractions.José Fonseca2014-01-231-230/+32
| | | | | | | Note that PIPE_ROUTINE now returns an int. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* os: Remove pipe_static_condvar.José Fonseca2014-01-231-12/+0
| | | | | | Never used. Reviewed-by: Brian Paul <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* gallium: fix build on GNU/Hurd due to missing PIPE_OS_HURD detectionCyril Brulebois2013-11-121-6/+6
| | | | | | | | Thanks to Pino Toscano. Patch from Debian package. Cc: "10.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* os: First check for __GLIBC__ and then for PIPE_OS_BSDAndreas Boll2013-09-121-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" <[email protected]> Tested-by: Julien Cristau <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* os: add os_get_process_name() functionBrian Paul2013-07-122-0/+132
| | | | | v2: explicitly test for BSD/APPLE, #warning for unexpected environments.
* os: add cast in os_time_sleep() to silence MSVC warningBrian Paul2013-06-261-1/+1
|
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-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 <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php 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 <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-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 <[email protected]>
* util: add debug_memory_check_block(), debug_memory_tag()Brian Paul2013-04-041-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 <[email protected]>
* gallium/os: Fix nano->micro second concersion.José Fonseca2012-12-081-1/+1
| | | | | | copy'n'paste: best friend, worst enemy.. Trivial.
* gallium/os: Cleanup up os_time_get/os_time_get_nano.José Fonseca2012-12-062-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 <[email protected]>
* gallium/os: Fix os_time_sleep() on Windows for small durations.José Fonseca2012-12-061-1/+5
| | | | | | Prevents undetermined sleeps. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Implement PIPE_QUERY_TIMESTAMP and PIPE_QUERY_TIME_ELAPSED.James Benton2012-12-032-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 <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* util: add more memory debugging featuresBrian Paul2012-11-281-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 <[email protected]>
* util: add GALLIUM_LOG_FILE option for logging output to a fileBrian Paul2012-05-251-3/+22
| | | | Useful for logging different runs to files and diffing, etc.
* auxiliary/os: Add missing signal.h include.Baldo Davide2012-05-051-0/+1
| | | | | | | | The signal.h include was missed in the commit bc16c73407d11bb6702cf7de9925bfaeb80a5272 which leads to broken compilations under Linux. Signed-off-by: José Fonseca <[email protected]>
* gallium: use Mesa pthread_barrier_t on Haiku, as it is incomplete under HaikuAlexander von Gluck2011-12-271-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* Remove windows kernel support code.José Fonseca2011-11-295-293/+6
| | | | | | Not actively used. Reviewed-by: Brian Paul <[email protected]>
* gallium/auxiliary: Remove os_stream.José Fonseca2011-11-296-652/+0
| | | | | | XP kernel mode was the only subsystem lacking stdio FILES. Reviewed-by: Brian Paul <[email protected]>
* auxiliary/os: add wrappers for mmap/munmapChia-I Wu2011-08-241-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.
* gallium: add PIPE_OS_ANDROID supportChia-I Wu2011-08-211-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 <[email protected]>
* scons: make embedding orthogonal to the platformJosé Fonseca2011-06-174-16/+7
| | | | To enable embedding in platforms other than linux.
* gallium: block signals for new thread when spawning threadsDave Airlie2011-05-161-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 <[email protected]>
* os: simplify ifdefnobled2011-04-271-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.
* os: Fix pipe_static_mutex on Windows.José Fonseca2011-03-061-1/+2
|
* os: Open file streams in binary mode.Michal Krol2010-11-081-1/+1
| | | | Otherwise we'll get garbled data on Windows.