1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 htri_t
 ss_scope_synchronized(ss_scope_t *scope,        /* A link to the scope whose synchronization state is to be queried. */
                       unsigned tableidx         /* Magic number to define which table to query. If TABLEIDX is greater than or
                                                  * equal to SS_NPERSL_CLASSES then all tables of the specified scope must be
                                                  * in a synchronized state before this function returns true. */
                       )
 {
     SS_ENTER(ss_scope_synchronized, htri_t);
     ss_prop_t           *props=NULL;
     htri_t              retval=TRUE;

     /* Build a synchronization property that says to only test synchronization */
     if (NULL==(props=ss_prop_new("test synchronization"))) SS_ERROR(FAILED);
     if (ss_prop_add(props, "test", H5T_NATIVE_HBOOL, &true)<0) SS_ERROR(FAILED);

     /* Test synchronization */
     if (ss_scope_synchronize(scope, tableidx, props)<0) {
         const H5E_error2_t *einfo;
         SS_STATUS(0, einfo);
         if (einfo->min_num!=SS_MINOR_SKIPPED) {
             SS_REFAIL;
             SS_ERROR(FAILED);
         } else {
             SS_STATUS_OK;
             retval = FALSE;
             goto done;
         }
     }

  done:
     /* Clean up the properties */
     ss_prop_dest(props);
     props = NULL;

  SS_CLEANUP:
     if (props) ss_prop_dest(props);
     SS_LEAVE(retval);
 }