aboutsummaryrefslogtreecommitdiff
path: root/rc3/runtime/test/tasking/omp_task_priority.c
blob: 6acb4a804e8ed1c06e412bcbe26e44c3d07043ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %libomp-compile && env OMP_MAX_TASK_PRIORITY=42 %libomp-run
// REQUIRES: openmp-4.5
// Test OMP 4.5 task priorities
// Currently only API function and envirable parsing implemented.
// Test environment sets envirable: OMP_MAX_TASK_PRIORITY=42 as tested below.
#include <stdio.h>
#include <omp.h>

int main (void) {
    int passed;

    passed = (omp_get_max_task_priority() == 42);
    printf("Got %d\n", omp_get_max_task_priority());

    if (passed) {
       printf("passed\n");
       return 0;
    }

    printf("failed\n");
    return 1;
}