]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/types/TinyError.h
Update to allow header files to be processed via standard gcc and not have to run...
[tinyos-2.x.git] / tos / types / TinyError.h
index 3974a93ed83c64076c926c8f47e6465130d87dcd..c2ed2bfab8c9b13f2ed60d9465def147a1f56e34 100644 (file)
 #ifndef TINY_ERROR_H_INCLUDED
 #define TINY_ERROR_H_INCLUDED
 
+#ifdef NESC
+#define NESC_COMBINE(x) @combine(x)
+#else
+#define NESC_COMBINE(x)
+#endif
+
 enum {
   SUCCESS        = 0,          
   FAIL           = 1,           // Generic condition: backwards compatible
@@ -41,9 +47,10 @@ enum {
   EINVAL         = 6,           // An invalid parameter was passed
   ERETRY         = 7,           // A rare and transient failure: can retry
   ERESERVE       = 8,           // Reservation required before usage
+  EALREADY       = 9,           // The device state you are requesting is already set
 };
 
-typedef uint8_t error_t __attribute__((combine(ecombine)));
+typedef uint8_t error_t NESC_COMBINE("ecombine");
 
 error_t ecombine(error_t r1, error_t r2)
 /* Returns: r1 if r1 == r2, FAIL otherwise. This is the standard error