pkarashchenko commented on code in PR #7028:
URL: https://github.com/apache/incubator-nuttx/pull/7028#discussion_r964460446


##########
include/nuttx/nuttx.h:
##########
@@ -48,4 +48,83 @@
 #define container_of(ptr, type, member) \
   ((type *)((uintptr_t)(ptr) - offsetof(type, member)))
 
+/* Name: max_t
+ *
+ * Description:
+ *   return maximum of two values, using the specified type
+ *
+ * Arguments:
+ *   type - data type to use
+ *   x    - first value
+ *   y    - second value
+ */
+
+#ifndef max_t
+#define max_t(type, x, y) ({               \
+        type _max1 = (x);                  \
+        type _max2 = (y);                  \
+        _max1 > _max2 ? _max1 : _max2; })

Review Comment:
   this seems to be GCC specific only



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to