]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
updates to annotations
authorregehr <regehr>
Thu, 14 Feb 2008 18:21:02 +0000 (18:21 +0000)
committerregehr <regehr>
Thu, 14 Feb 2008 18:21:02 +0000 (18:21 +0000)
tos/lib/safe/include/deputy_annots.h
tos/lib/safe/include/deputy_no_annots.h
tos/lib/safe/include/nesc_annots.h
tos/lib/safe/include/nesc_no_annots.h [new file with mode: 0644]

index 6e276912899394f22c91ef5971e3cd1e9d8f0a9f..15b6f1c3bb96e8f8e931f5a627fdac16f4e004d9 100644 (file)
@@ -1,11 +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 * __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))
+#define __DEPUTY_NONNULL(__n)                  __attribute__((nonnull))
 #define __DEPUTY_TRUSTEDBLOCK                  __blockattribute__((trusted))
index c3adeade836d02fe153ba1aa5eba6fc28f4d0752..f6ac7c25efcf1a7592e1b9ae3de53678af6d62f6 100644 (file)
@@ -1,11 +1,6 @@
 #define __DEPUTY_BOUND(__lo,__hi)              
 #define __DEPUTY_COUNT(__n)                    
 #define __DEPUTY_SINGLE(__n)                   
-#define __DEPUTY_TRUSTED_CAST(__type,__expr)   ((__type)(__expr))
 
-#define TC(__type,__expr)                      __DEPUTY_TRUSTED_CAST(__type,__expr)
-
-#define __DEPUTY_NONNULL                       
-#define __DEPUTY_TRUSTED                       
-#define __DEPUTY_COPYTYPE                      
+#define __DEPUTY_NONNULL(__n)                  
 #define __DEPUTY_TRUSTEDBLOCK                  
index 5b4220de6c094d93723feb5c78dac2cff5fc23df..b918a541d1b10aa79e47b27877e2a4372eb29a6a 100644 (file)
@@ -2,3 +2,8 @@ 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") { }; 
 struct @nonnull @deputy_scope() @macro("__DEPUTY_NONNULL") { }; 
+
+#define __DEPUTY_TRUSTED                       __attribute__((trusted))
+#define __DEPUTY_COPYTYPE                      __attribute__((copytype))
+#define TC(__type,__expr)                      __DEPUTY_TRUSTED_CAST(__type,__expr)
+#define __DEPUTY_TRUSTED_CAST(__type,__expr)   ((__type)((void * __DEPUTY_TRUSTED __DEPUTY_COPYTYPE)(__expr)))
diff --git a/tos/lib/safe/include/nesc_no_annots.h b/tos/lib/safe/include/nesc_no_annots.h
new file mode 100644 (file)
index 0000000..4256564
--- /dev/null
@@ -0,0 +1,9 @@
+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") { }; 
+struct @nonnull @deputy_scope() @macro("__DEPUTY_NONNULL") { }; 
+
+#define __DEPUTY_TRUSTED                       
+#define __DEPUTY_COPYTYPE                      
+#define TC(__type,__expr)                      __DEPUTY_TRUSTED_CAST(__type,__expr)   
+#define __DEPUTY_TRUSTED_CAST(__type,__expr)   ((__type)(__expr))