8 Value *r1, *r2, *r3, *r4, *v1, *v2;
10 void printKey(Key *key) {
12 printf("pos = (%d, %d, %d)\n", key->x, key->y, key->z);
14 printf("pos = NULL\n");
17 void printValue(Value *value) {
19 printf("velocity = (%d, %d, %d)\n", value->vX, value->vY, value->vZ);
21 printf("velocity = NULL\n");
24 void threadA(void *arg) {
25 k1 = new Key(1, 1, 1);
26 k2 = new Key(3, 4, 5);
27 v1 = new Value(10, 10, 10);
28 r1 = table->put(k1, v1);
35 void threadB(void *arg) {
36 k1 = new Key(1, 1, 1);
37 k2 = new Key(3, 4, 5);
38 v2 = new Value(30, 40, 50);
39 r3 = table->put(k2, v2);
46 int user_main(int argc, char *argv[]) {
50 thrd_create(&t1, threadA, NULL);
51 thrd_create(&t2, threadB, NULL);