Example #1
0
int main()
{
    const char buf[] = "i am children 2";

    nokia::AffinityProcess process1(Process1);
    nokia::AffinityProcess process2(Process2, static_cast<void*>(const_cast<char*>(buf)));
    nokia::AffinityProcess process3(Process2, static_cast<void*>(const_cast<char*>("22")));
    nokia::AffinityProcess process4(Process2, static_cast<void*>(const_cast<char*>("33")));
    nokia::AffinityProcess process5(Process2, static_cast<void*>(const_cast<char*>("44")));
    nokia::AffinityProcess process6(Process2, static_cast<void*>(const_cast<char*>("55")));
    nokia::AffinityProcess process7(Process2, static_cast<void*>(const_cast<char*>("66")));
    nokia::AffinityProcess process8(Process2, static_cast<void*>(const_cast<char*>("77")));
    nokia::AffinityProcess process9(Process2, static_cast<void*>(const_cast<char*>("88")));
    nokia::AffinityProcess process10(Process2, static_cast<void*>(const_cast<char*>("99")));

    process1.Wait();
    process2.Wait();
    process3.Wait();
    process4.Wait();
    process5.Wait();
    process6.Wait();
    process7.Wait();
    process8.Wait();
    process9.Wait();
    process10.Wait();
    return 0;
}
Example #2
0
	void process( array * base ) {
		if ( base->k > MAXK )
			return;

		process1( base );
		
		if ( base->t < MAXT ) {
			process2( base );
		}

		process3( base );
	}