[Tinyos-2-commits] CVS: tinyos-2.x/support/sdk/c/sf message.c, 1.1, 1.2 message.h, 1.1, 1.2
David Gay
idgay at users.sourceforge.net
Fri Sep 19 15:12:34 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/support/sdk/c/sf
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25118
Modified Files:
message.c message.h
Log Message:
add reset_tmsg from Eric Decker (cire831 at gmail.com)
Index: message.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/c/sf/message.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** message.c 5 Dec 2007 22:49:46 -0000 1.1
--- message.c 19 Sep 2008 22:12:32 -0000 1.2
***************
*** 37,40 ****
--- 37,48 ----
}
+ void reset_tmsg(tmsg_t *msg, void *packet, size_t len)
+ {
+ if (!msg)
+ return;
+ msg->data = packet;
+ msg->len = len;
+ }
+
void *tmsg_data(tmsg_t *msg)
{
Index: message.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/c/sf/message.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** message.h 5 Dec 2007 22:49:46 -0000 1.1
--- message.h 19 Sep 2008 22:12:32 -0000 1.2
***************
*** 44,47 ****
--- 44,52 ----
void free_tmsg(tmsg_t *msg);
+ /**
+ * Reuse an existing tmsg
+ */
+ void reset_tmsg(tmsg_t *msg, void *packet, size_t len) ;
+
/**
* Return underlying array of a message buffer
More information about the Tinyos-2-commits
mailing list