Re: MOD_INC_USE_COUNT

H. Peter Anvin (hpa@transmeta.com)
Tue, 11 Nov 1997 04:10:39 -0800 (PST)


> > Maybe we could get a gcc hack using the __attribute__(())
> > mechanism... say __attribute__((no_block)); any routine marked
> > nonblocking would print a warning if it called a blocking routine. I
> > understand this is a mechanism already build into gcc to support
> > various system-dependent hacks...
>
> How about
>
[...runtime solution...]
>
> check in schedule or the sleep_on functions
>
> if a debug option is set
>

True, but with the __attribute__(()) hack we could get compile-time
checking, which would be both safer and eliminate the runtime cost.

-hpa