// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <pthread.h>

#include <iostream>

using namespace std;

void *x(void *a)
{
    cout << "x" << endl;
    return NULL;
}

void *y(void *a)
{
    cout << "y" << endl;
    return NULL;
}

int main()
{
    pthread_t xy1,xy2;
    pthread_create(&xy1, NULL, x, NULL);
    pthread_create(&xy2, NULL, y, NULL);
    void *retval1,*retval2;
    pthread_join(xy1,&retval1);
    pthread_join(xy2,&retval2);
    return 0;
}
