Displaying 3 results from an estimated 3 matches for "mcp_wait_for_exit".
2007 Jul 27
2
[LLVMdev] Forcing JIT of all functions before execution starts (was: Implementing sizeof)
...main(int argc, char **argv)
{
printf("--- Running threads serially:\n");
thread1(0);
thread2(0);
printf("--- Running threads in parallel:\n");
mcp_begin_thread(thread1, 0);
mcp_begin_thread(thread2, 0);
printf("--- Waiting for child threads to terminate\n");
mcp_wait_for_exit();
printf("--- Bye...\n");
return 0;
}
works perfectly, because thread1() and thread2() are forced into
existence before they are referenced by mcp_begin_thread() (i.e. as a
parameter to makecontext). Commenting out the running threads serially
section results in a seg fault inside...
2007 Jul 27
0
[LLVMdev] Implementing sizeof
Check out http://nondot.org/sabre/LLVMNotes
-Chris
http://nondot.org/sabre
http://llvm.org
On Jul 27, 2007, at 12:00 PM, Sarah Thompson <thompson at email.arc.nasa.gov
> wrote:
> Hi folks,
>
> Assuming that I'm writing a pass and that for bizarre reasons I need
> to
> programmatically do the equivalent of a C/C++ sizeof on a Value (or a
> Type, it doesn't
2007 Jul 27
3
[LLVMdev] Implementing sizeof
Hi folks,
Assuming that I'm writing a pass and that for bizarre reasons I need to
programmatically do the equivalent of a C/C++ sizeof on a Value (or a
Type, it doesn't matter which really), yielding a result in bytes, what
is the known-safe way to do this? I notice that doing something like
struct thingy
{
... some stuff ...
};
...
printf("Size = %d",