[LLVMdev] Preemption with LLVM

Duncan Sands baldrick at free.fr
Mon Dec 12 01:05:50 PST 2011


Hi Andrew,

> I'm investigating LLVM for use for a future project of mine, and I was
> wondering whether something is possible.  Specifically, I'm wondering
> if there's a way to force preemption of a green thread-style task -
> something like Erlang's "processes", where if a task executes for too
> long, it is preempted. [1]

LLVM itself has no native support for this kind of thing, in fact it
relies on you calling system libraries for all threading support.

> My main goal here is to avoid having to write my own virtual machine -
> the JVM is, as far as I can tell, not appropriate for when you want to
> create hundreds of tasks, and I could not find any other VM that is
> appropriate for this type of project (though suggestions are welcome).

LLVM isn't a virtual machine in the JVM sense.

Ciao, Duncan.



More information about the llvm-dev mailing list