Microsoft Windows* 8


void __cilkrts_init(void);

This function allocates Intel® Cilk™ Plus data structures, starting the runtime. This function is documented for completeness; it should never be necessary to call this function explicitly, as the runtime system calls it automatically when needed (for example, to execute the first cilk_spawn or cilk_for in a program).


int __cilkrts_set_param(const char* name, const char* value);

This function controls parameters of the Intel® Cilk™ Plus runtime system. The two string parameters form a name/value pair. The following name argument is recognized:

Data Races

Races are a major cause of bugs in parallel programs.

A determinacy race occurs when two parallel strands access the same memory location and at least one strand performs a write operation. The program result depends on which strand "wins the race" and accesses the memory first.

Locks Cause Determinancy Races

Even if you properly use a lock to protect a resource (such as a simple variable or a list or other data structure), the actual order that two strands modify the resource is not deterministic. For example, suppose the following code fragment is part of a function that is spawned, so that several strands may be executing the code in parallel.


A deadlock can occur when using two or more locks and different strands acquire the locks in different orders. It is possible for two or more strands to become deadlocked when each strand acquires a mutex that the other strand attempts to acquire.

Microsoft Windows* 8 abonnieren