[CRIU] [PATCH] cr_errno: move cr_err helpers into cr_errno.h

Ruslan Kuprieiev kupruser at gmail.com
Fri Dec 19 10:49:32 PST 2014


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 cr-restore.c       | 3 ---
 include/cr-errno.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index 65d9918..c8a004d 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -861,9 +861,6 @@ static inline int sig_fatal(int sig)
 struct task_entries *task_entries;
 static unsigned long task_entries_pos;
 
-#define set_task_cr_err(new_err)	atomic_cmpxchg(&task_entries->cr_err, 0, new_err)
-#define get_task_cr_err()		atomic_read(&task_entries->cr_err)
-
 static int restore_one_zombie(int pid, CoreEntry *core)
 {
 	int exit_code = core->tc->exit_code;
diff --git a/include/cr-errno.h b/include/cr-errno.h
index 3e10192..1f94988 100644
--- a/include/cr-errno.h
+++ b/include/cr-errno.h
@@ -11,4 +11,7 @@ int get_cr_errno(void);
  * EBADRQC	- bad options
  */
 
+#define set_task_cr_err(new_err)	atomic_cmpxchg(&task_entries->cr_err, 0, new_err)
+#define get_task_cr_err()		atomic_read(&task_entries->cr_err)
+
 #endif /* __CR_ERRNO_H__ */
-- 
2.1.0



More information about the CRIU mailing list