summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os/os_thread.h
Commit message (Collapse)AuthorAgeFilesLines
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-17/+17
| | | | | | | | | | | | | | | | 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 <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
* 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 <sroland@vmware.com>
* 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 <brianp@vmware.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
* os: Remove pipe_static_condvar.José Fonseca2014-01-231-12/+0
| | | | | | Never used. Reviewed-by: Brian Paul <brianp@vmware.com>
* 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/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # 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 <brianp@vmware.com>
* 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" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <jose.r.fonseca@gmail.com>
* gallium: use Mesa pthread_barrier_t on Haiku, as it is incomplete under HaikuAlexander von Gluck2011-12-271-1/+1
| | | | | Reviewed-by: Brian Paul <brianp@vmare.com> Signed-off-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* scons: make embedding orthogonal to the platformJosé Fonseca2011-06-171-6/+6
| | | | 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 <airlied@redhat.com>
* os: Fix pipe_static_mutex on Windows.José Fonseca2011-03-061-1/+2
|
* os: remove gratuitous pipe_barrier placeholder codenobled2010-07-121-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.
* os, rbug: remove PIPE_THREAD_HAVE_CONDVARnobled2010-07-121-1/+0
| | | | | The new default implementation of pipe_condvar makes it unnecessary.
* os: Implement pipe_condvar on Windows Vista and laternobled2010-07-121-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.
* os: Implement pipe_condvar on win32nobled2010-07-121-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.
* gallium: Add tokens for Cygwin.Vinson Lee2010-05-131-5/+5
|
* os: Check for spurious wakeups in pipe_barrier_wait.Vinson Lee2010-04-261-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.
* os: Implement pipe_barrier for POSIX platforms without pthread_barrier_t.Vinson Lee2010-04-171-5/+26
| | | | This patch was tested on Mac OS X.
* os: Temporarily use posix thread for embedded too.Kurt Daverman2010-03-311-6/+6
|
* os: Do not use Pthreads barrier functions on Mac OS X.Vinson Lee2010-02-101-42/+52
| | | | Pthreads barrier functions are not available on some POSIX platforms.
* os: Don't assert on missing implementation of barrier init/destroy. Just usage.José Fonseca2010-02-051-2/+0
|
* Merge remote branch 'origin/lp-binning'José Fonseca2010-02-051-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
* os: Add missing dummy threading definitions.José Fonseca2010-02-041-0/+19
|
* gallium: Move p_thread.h and p_atomic.h out of gallium interfaces.José Fonseca2010-02-021-0/+279
Into os/os_thread.h and util/u_atomic.h respectively.