[CRIU] [PATCH 02/12] posix-timer: Add protobuf message and rename to protobuf/timer.proto

Pavel Tikhomirov snorcht at gmail.com
Thu Jun 27 12:32:18 EDT 2013


Signed-off-by: Pavel Tikhomirov <snorcht at gmail.com>
---
 cr-restore.c            |    2 +-
 cr-show.c               |    2 +-
 include/protobuf-desc.h |    1 +
 parasite-syscall.c      |    2 +-
 protobuf-desc.c         |    3 ++-
 protobuf/Makefile       |    2 +-
 protobuf/itimer.proto   |    6 ------
 protobuf/timer.proto    |   20 ++++++++++++++++++++
 8 files changed, 27 insertions(+), 11 deletions(-)
 delete mode 100644 protobuf/itimer.proto
 create mode 100644 protobuf/timer.proto

diff --git a/cr-restore.c b/cr-restore.c
index 8983f4c..f5b131a 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -62,7 +62,7 @@
 
 #include "protobuf.h"
 #include "protobuf/sa.pb-c.h"
-#include "protobuf/itimer.pb-c.h"
+#include "protobuf/timer.pb-c.h"
 #include "protobuf/vma.pb-c.h"
 #include "protobuf/rlimit.pb-c.h"
 #include "protobuf/pagemap.pb-c.h"
diff --git a/cr-show.c b/cr-show.c
index caf1cb1..15cc907 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -37,7 +37,7 @@
 #include "protobuf/pipe.pb-c.h"
 #include "protobuf/pipe-data.pb-c.h"
 #include "protobuf/sa.pb-c.h"
-#include "protobuf/itimer.pb-c.h"
+#include "protobuf/timer.pb-c.h"
 #include "protobuf/mm.pb-c.h"
 #include "protobuf/vma.pb-c.h"
 #include "protobuf/creds.pb-c.h"
diff --git a/include/protobuf-desc.h b/include/protobuf-desc.h
index 604216b..7321123 100644
--- a/include/protobuf-desc.h
+++ b/include/protobuf-desc.h
@@ -13,6 +13,7 @@ enum {
 	PB_VMAS,
 	PB_SIGACT,
 	PB_ITIMERS,
+	PB_POSIX_TIMERS,
 	PB_CREDS,
 	PB_FS,
 	PB_UTSNS,
diff --git a/parasite-syscall.c b/parasite-syscall.c
index fcaa299..0fb9b5a 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -7,7 +7,7 @@
 
 #include "protobuf.h"
 #include "protobuf/sa.pb-c.h"
-#include "protobuf/itimer.pb-c.h"
+#include "protobuf/timer.pb-c.h"
 #include "protobuf/creds.pb-c.h"
 #include "protobuf/core.pb-c.h"
 #include "protobuf/pagemap.pb-c.h"
diff --git a/protobuf-desc.c b/protobuf-desc.c
index 9846680..eeb17ba 100644
--- a/protobuf-desc.c
+++ b/protobuf-desc.c
@@ -36,7 +36,7 @@
 #include "protobuf/packet-sock.pb-c.h"
 #include "protobuf/sk-packet.pb-c.h"
 #include "protobuf/creds.pb-c.h"
-#include "protobuf/itimer.pb-c.h"
+#include "protobuf/timer.pb-c.h"
 #include "protobuf/utsns.pb-c.h"
 #include "protobuf/ipc-var.pb-c.h"
 #include "protobuf/ipc-shm.pb-c.h"
@@ -109,6 +109,7 @@ void cr_pb_init(void)
 	CR_PB_DESC(INETSK,		InetSk,		inet_sk);
 	CR_PB_DESC(SK_QUEUES,		SkPacket,	sk_packet);
 	CR_PB_DESC(ITIMERS,		Itimer,		itimer);
+	CR_PB_DESC(POSIX_TIMERS,	PosixTimer,	posix_timer);
 	CR_PB_DESC(CREDS,		Creds,		creds);
 	CR_PB_DESC(UTSNS,		Utsns,		utsns);
 	CR_PB_DESC(IPCNS_VAR,		IpcVar,		ipc_var);
diff --git a/protobuf/Makefile b/protobuf/Makefile
index eb46a4c..d85943f 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -34,7 +34,7 @@ proto-obj-y	+= sk-packet.o
 proto-obj-y	+= mnt.o
 proto-obj-y	+= pipe-data.o
 proto-obj-y	+= sa.o
-proto-obj-y	+= itimer.o
+proto-obj-y	+= timer.o
 proto-obj-y	+= mm.o
 proto-obj-y	+= sk-opts.o
 proto-obj-y	+= sk-unix.o
diff --git a/protobuf/itimer.proto b/protobuf/itimer.proto
deleted file mode 100644
index e7335f6..0000000
--- a/protobuf/itimer.proto
+++ /dev/null
@@ -1,6 +0,0 @@
-message itimer_entry {
-	required uint64		isec		= 1;
-	required uint64		iusec		= 2;
-	required uint64		vsec		= 3;
-	required uint64		vusec		= 4;
-}
diff --git a/protobuf/timer.proto b/protobuf/timer.proto
new file mode 100644
index 0000000..f7ac3d3
--- /dev/null
+++ b/protobuf/timer.proto
@@ -0,0 +1,20 @@
+message itimer_entry {
+	required uint64		isec		= 1;
+	required uint64		iusec		= 2;
+	required uint64		vsec		= 3;
+	required uint64		vusec		= 4;
+}
+
+message posix_timer_entry {
+	required uint32 	it_id 		= 1;
+	required uint32		clock_id	= 2;
+	required uint32 	si_signo	= 3;
+	required uint32		it_sigev_notify = 4;
+	required uint64		sival_ptr	= 5;
+	required uint32		overrun		= 6;
+
+	required uint64		isec		= 7;
+	required uint64		insec		= 8;
+	required uint64		vsec		= 9;
+	required uint64		vnsec		= 10;
+}
-- 
1.7.9.5



More information about the CRIU mailing list