[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/safe/include
deputy_no_annots.h, NONE, 1.1 deputy_annots.h, 1.1,
1.2 nesc_annots.h, 1.1, 1.2
John Regehr
regehr at users.sourceforge.net
Mon Feb 11 12:46:41 PST 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/safe/include
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6297/include
Modified Files:
deputy_annots.h nesc_annots.h
Added Files:
deputy_no_annots.h
Log Message:
Annotation improvements, and add deputy_no_annots.h which causes CPP
to take an app.c and squash all annotations.
--- NEW FILE: deputy_no_annots.h ---
#define __DEPUTY_BOUND(__lo,__hi)
#define __DEPUTY_COUNT(__n)
#define __DEPUTY_SINGLE(__n)
#define __DEPUTY_TRUSTED_CAST(__type,__expr)
#define TC(__type,__expr) __DEPUTY_TRUSTED_CAST(__type,__expr)
Index: deputy_annots.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/safe/include/deputy_annots.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** deputy_annots.h 11 Feb 2008 19:06:42 -0000 1.1
--- deputy_annots.h 11 Feb 2008 20:46:38 -0000 1.2
***************
*** 1,6 ****
#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)
--- 1,10 ----
#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 * __DEPUTY_TRUSTED __DEPUTY_COPYTYPE)(__expr)))
#define TC(__type,__expr) __DEPUTY_TRUSTED_CAST(__type,__expr)
+
+ #define __DEPUTY_NONNULL __attribute__((nonnull))
+ #define __DEPUTY_TRUSTED __attribute__((trusted))
+ #define __DEPUTY_COPYTYPE __attribute__((copytype))
Index: nesc_annots.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/safe/include/nesc_annots.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** nesc_annots.h 11 Feb 2008 19:06:42 -0000 1.1
--- nesc_annots.h 11 Feb 2008 20:46:38 -0000 1.2
***************
*** 1,3 ****
! 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") { };
--- 1,3 ----
! 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