plat/leo/common/include/leo_shres_helpers.h
/* Return 1 if refcnt increments from 0, else return 0 */
Return 1 if refcnt increments from 0, else return 0
Return 1 if refcnt increments from 0 else return 0
static inline int leo_incr_shrefcnt(unsigned int *refcnt, bool secure)
{
	int rc = !*refcnt;
	if (secure) {
		*refcnt += SHREFCNT_SECURE_STEP;
		if (*refcnt >= SHREFCNT_MAX) {
			panic();
		}
	} else {
		*refcnt |= SHREFCNT_NONSECURE_FLAG;
	}
	return rc;
}
static inline int leo_incr_shrefcnt ( unsigned int * refcnt , bool secure ) { int rc = ! * refcnt ; if ( secure ) { * refcnt += SHREFCNT_SECURE_STEP ; if ( * refcnt >= SHREFCNT_MAX ) { panic ( ) ; } } else { * refcnt |= SHREFCNT_NONSECURE_FLAG ; } return rc ; }
Return 1 if refcnt increments from 0, else return 0
Return 1 if refcnt increments from 0 else return 0