[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/safe/include deputy_annots.h, NONE, 1.1 nesc_annots.h, NONE, 1.1

John Regehr regehr at users.sourceforge.net
Mon Feb 11 11:06:44 PST 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/safe/include
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27542

Added Files:
	deputy_annots.h nesc_annots.h 
Log Message:
First draft at the subset of Deputy annotations we'll support.

nesc_annots.h -- This tells nesC how to translate new attributes like
                 @count into the appropriate Deputy macro

deputy_annots.h -- This tells CPP how to translate (our) Deputy macros
                   into the low-level form actually understood by Deputy.



--- NEW FILE: deputy_annots.h ---
#define __DEPUTY_BOUND(__lo,__hi)              __attribute__((bounds((__lo),(__hi))))
#define __DEPUTY_COUNT(__n)                    _DEPUTY_BOUND(__this, __this + (__n))
#define __DEPUTY_SINGLE(__n)                   _DEPUTY_COUNT(1)
#define __DEPUTY_TRUSTED_CAST(__type,__expr)   ((__type)((void * TRUSTED COPYTYPE)(__expr)))

#define TC(__type,__expr)                      __DEPUTY_TRUSTED_CAST(__type,__expr)

--- NEW FILE: nesc_annots.h ---
struct @bound @deputy_scope() @macro("_DEPUTY_BOUND") { void *lo, *hi; }; 
struct @count @deputy_scope() @macro("_DEPUTY_COUNT") { int n; }; 
struct @single @deputy_scope() @macro("_DEPUTY_SINGLE") { }; 



More information about the Tinyos-2-commits mailing list