mtapi_c_start_task-snippet.h 713 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  /* start task */
  int result;
  task = mtapi_task_start(
    MTAPI_TASK_ID_NONE,                /* optional task ID */
    fibonacciJob,                      /* job */
    (void*)&n,                         /* arguments passed to action
                                          functions */
    sizeof(int),                       /* size of arguments */
    (void*)&result,                    /* result buffer */
    sizeof(int),                       /* size of result buffer */
    MTAPI_DEFAULT_TASK_ATTRIBUTES,     /* task attributes */
    MTAPI_GROUP_NONE,                  /* optional task group */
    &status                            /* status out - parameter */
  );
  MTAPI_CHECK_STATUS(status);