Module: xenomai-forge
Branch: rtdm-api-waitqueues
Commit: 381d3671029b6726ce0764b4485beb350e07da88
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=381d3671029b6726ce0764b4485beb350e07da88

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Apr 17 11:54:47 2014 +0200

cobalt/kernel: introduce k[v]asformat() helper

---

 include/cobalt/kernel/ancillaries.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/cobalt/kernel/ancillaries.h 
b/include/cobalt/kernel/ancillaries.h
index e1e59f2..88c0afb 100644
--- a/include/cobalt/kernel/ancillaries.h
+++ b/include/cobalt/kernel/ancillaries.h
@@ -30,6 +30,11 @@
                __ret;                                                  \
        })
 
+#define kasformat(__fmt, __args...)                                    \
+       ({                                                              \
+               kasprintf(GFP_KERNEL, __fmt, ##__args);                 \
+       })
+
 #define kvsformat(__dst, __len, __fmt, __ap)                           \
        ({                                                              \
                size_t __ret;                                           \
@@ -39,4 +44,9 @@
                __ret;                                                  \
        })
 
+#define kvasformat(__fmt, __ap)                                                
\
+       ({                                                              \
+               kvasprintf(GFP_KERNEL, __fmt, __ap);                    \
+       })
+
 #endif /* !_COBALT_KERNEL_ANCILLARIES_H */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to