|
Some recent topics started on our forums |
Runtime TLS initialization when using clone()
|
If I create threads using clone() with the CLONE_THREAD flag, can I assume that any thread local storage the glibc runtime uses, as well as anything I have declared with __thread, is initialized properly? In Windows, _beginthreadex provides for this... |
Posted January 5, 2011 8:30:44 PM
|
BlockInput() from a service
|
In Vista and later, services run in session 0 and logged in users in session 1. BlockInput(1) doesn't return any error when I run it in my watchdog service, but it doesn't have any effect since the service doesn't interact with the desktop. Changin... |
Posted December 21, 2010 3:24:05 PM
|
Linking with different calling convention
|
If I enable /Gr in MSVC for my C++ project, which changes the default calling convention to __fastcall (does this matter in 64-bit BTW? it's still an option when I compile to a 64-bit target) then I have a problem calling the functions of a C librar... |
Posted December 20, 2010 4:04:38 PM
|
Share stringstream between processes
|
If I allocate a stringstream in shared memory, it seems it would be OK in Windows as I've read that "Microsoft Compiler uses process-neutral offsets to address base objects for virtually inherited classes" but this might not be the case in Linux if I... |
Posted December 20, 2010 8:36:32 PM
|
Forcing exception in another thread
|
The MSVC example of using exception_ptr/rethrow_exception()/current_exception() shows only how to send exception data to another thread, but the user has to explicitly call rethrow_exception(), and so the exception is not rethrown automatically.... |
Posted December 8, 2010 9:53:48 PM
|
Need for CPU (vs just compiler) barriers on x86(-64)
|
It is my understanding that on x86 and x68-64 the only reordering is that loads may be reordered with older stores to different locations.
With this in mind, I'm wondering if a compiler barrier is sufficient in Linux if one were to po... |
Posted December 16, 2010 7:43:33 PM
|
OpenGL without X on NVIDIA
|
Why do NVIDIA drivers force one to use X? What if one, for example, wanted to 1) have only a fullscreen app and not lose any performance because there was a windowing system running, or 2) build an alternative to X on top of Open... |
Posted December 17, 2010 3:28:12 PM
|
Given unexpected() why is there a terminate()
|
I don't see the point of having both of these. terminate() is assumed to have to exit the program so it's more restricted, but why have it at all when the less restricted unexpected() exists? |
Posted December 14, 2010 12:58:14 AM
|
Send message to a service process
|
I've been using events to communicate between my app and my watchdog service, but after I noticed some crash events in the app can sometimes cause it to corrupt the log file, I decided to have it also send error logs to the service which would write... |
Posted December 8, 2010 2:40:08 PM
|
volatile and consistency
|
There are various articles discouraging the use of the volatile keyword in multithreaded programming because it provides no ordering and atomicity guarantees (needing barriers and/or interlocked instructions).
However, in Intel TBB internals o... |
Posted December 7, 2010 9:19:56 PM
|
View All Topics Started By This User
|
|
Some recent replies made on our forums |
Runtime TLS initialization when using clone()
|
Looks like RLIMIT_NICE is 0 for regular users....
Adding entries for the soft and hard limits for nice for a given user/group in /etc/security/limits.conf solved the problem. I don't understand why in Linux one needs to edit a file which o... |
Posted January 6, 2011 8:22:36 PM
|
Runtime TLS initialization when using clone()
|
The only reason I didn't use pthreads is since pthread_create() would be the only function I'm using (I use atomic operations and FUTEXes directly for synchronization). But it's no big deal and I'll do it with pthread_create().
The seco... |
Posted January 6, 2011 7:19:51 PM
|
Linking with different calling convention
|
Too bad there's no pragma to override the setting for a specific block of code...
In the end I simply gave up on __fastcall as most of my functions are class methods and they're always __thiscall anyway. |
Posted December 21, 2010 3:14:47 PM
|
Linking with different calling convention
|
Thanks, that solves my second question. However, I still wonder about the other as I'm targeting both 32 and 64. |
Posted December 20, 2010 8:15:59 PM
|
Forcing exception in another thread
|
Anyone? |
Posted December 20, 2010 4:10:10 PM
|
Need for CPU (vs just compiler) barriers on x86(-64)
|
Quote:Original post by phantom
That's probably down to MS's x64 compiler not allowing inline assembly to be used; you have to use intrinsics or write the whole function externally as assembly
Given, this, is there any reason not to use the intrinsi... |
Posted December 20, 2010 4:07:15 PM
|
Need for CPU (vs just compiler) barriers on x86(-64)
|
I'm having trouble coming up with a natural example of when the CPU barrier is needed. I've also noticed an interesting compiler-and-wordsize-dependent variation of the CPU barrier in Intel's TBB code:
Windows 32
Intel C++ and MSVC: __asm { __as... |
Posted December 17, 2010 11:33:35 PM
|
Forcing exception in another thread
|
I've come up across a design issue here: where do I best null a stored exception? Execution continues after the catch {}, but it would be pretty ugly code to insert check after every catch block to see whether the exception of a particular type so t... |
Posted December 17, 2010 3:51:58 PM
|
Real-time Global Illumination and Ray Tracing
|
Quote:Original post by jcabeleira
(although its quality is somewhat inferior)
I think it will scale better as one wants to do more detail with improving hardware. Already the performance seems to be there with say GTX580 etc. Gotta have an e... |
Posted December 17, 2010 3:33:54 PM
|
C++ Math Classes.
|
Quote:Original post by RobTheBloke
*** Source Snippet Removed ***
@Misery, Not sure if you know this, but using the [] operator is actually faster on modern hardware than using pointers as iterators.... (See AMD optimisation guide for de... |
Posted December 17, 2010 3:31:19 PM
|
View All Replies Made By This User
|