tools: Add err.h with ERR_PTR PTR_ERR interface
Adding part of the kernel's <linux/err.h> interface: inline void * __must_check ERR_PTR(long error); inline long __must_check PTR_ERR(__force const void *ptr); inline bool __must_check IS_ERR(__force const void *ptr); It will be used to propagate error through pointers in following patches. Signed-off-by: NJiri Olsa <jolsa@kernel.org> Reviewed-by: NRaphael Beamonte <raphael.beamonte@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1441615087-13886-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Showing
tools/include/linux/err.h
0 → 100644
想要评论请 注册 或 登录