Is the optional leading context argument
(the x in __attribute__((context(x, 0, 1)))
documented anywhere?  Apologies if this is
a FAQ, but I've looked.

Failing that, can someone enlighten me about
why sparse doesn't find any problems with
the function bad() below?  I am using sparse-0.2.

Thanks.
Russ

---

#define __acquires(x) __attribute__((context(x, 0, 1)))
#define __releases(x) __attribute__((context(x, 1, 0)))

typedef struct redlock redlock_t;
typedef struct bluelock bluelock_t;

void redlock(redlock_t *r) __acquires(r);
void redunlock(redlock_t *r) __releases(r);

void bluelock(bluelock_t *b) __acquires(b);
void blueunlock(bluelock_t *b) __releases(b);

void
bad(redlock_t *r, bluelock_t *b)
{
        redlock(r);
        blueunlock(b);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to