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
 int
 saf_data_has_been_written_to_field(SAF_ParMode pmode,   /* The parallel mode. */
                                    SAF_Field *field,    /* The field handle. */
                                    hbool_t *Presult     /* [OUT] A pointer to caller supplied memory which is to receive the answer
                                                          * to the question.  A value of true is saved at this location if the
                                                          * field has had data written to it, false if not. */
                                    )
 {
     SAF_ENTER(saf_data_has_been_written_to_field, SAF_PRECONDITION_ERROR);

     SAF_REQUIRE(_saf_valid_pmode(pmode), SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
                 _saf_errmsg("PMODE must be valid"));
     if (!_saf_is_participating_proc(pmode)) SAF_RETURN(-1);

     SAF_REQUIRE(SS_FIELD(field), SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
                 _saf_errmsg("FIELD must be a valid field handle for all participating processes"));

     if (SS_PERS_ISNULL(SS_FIELD_P(field,dof_blob)) && 0==ss_array_nelmts(SS_FIELD_P(field,indirect_fields))) {
         if (Presult) *Presult = FALSE;
     } else {
         if (Presult) *Presult = TRUE;
     }

     SAF_LEAVE(SAF_SUCCESS);
 }