Module: xenomai-rpm Branch: queue/vfile Commit: 241bc7dd3bd26cbce29dc65ef6dcaece90478436 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=241bc7dd3bd26cbce29dc65ef6dcaece90478436
Author: Philippe Gerum <r...@xenomai.org> Date: Thu Apr 29 19:53:39 2010 +0200 wrappers: introduce kzalloc() for 2.4 kernels --- include/asm-generic/wrappers.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h index f67f422..56fafbc 100644 --- a/include/asm-generic/wrappers.h +++ b/include/asm-generic/wrappers.h @@ -338,6 +338,19 @@ unsigned long find_next_bit(const unsigned long *addr, #define wrap_f_inode(file) ((file)->f_dentry->d_inode) +static inline void *kzalloc(size_t size, int flags) +{ + void *ptr; + + ptr = kmalloc(size, flags); + if (ptr == NULL) + return NULL; + + memset(ptr, 0, size); + + return ptr; +} + #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) */ #define compat_module_param_array(name, type, count, perm) \ _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git