r3859 - trunk/birnet
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: r3859 - trunk/birnet
- Date: Mon, 21 Aug 2006 18:08:31 -0400 (EDT)
Author: timj
Date: 2006-08-21 18:08:23 -0400 (Mon, 21 Aug 2006)
New Revision: 3859
Modified:
trunk/birnet/ChangeLog
trunk/birnet/birnetutils.c
trunk/birnet/birnetutils.h
Log:
Mon Aug 21 01:03:24 2006 Tim Janik <timj gtk org>
* birnetutils.h, birnetutils.c: added birnet_memset4(), a function to
fill large memory regions with data of 32bit integer width.
Modified: trunk/birnet/ChangeLog
===================================================================
--- trunk/birnet/ChangeLog 2006-08-16 16:14:36 UTC (rev 3858)
+++ trunk/birnet/ChangeLog 2006-08-21 22:08:23 UTC (rev 3859)
@@ -1,3 +1,8 @@
+Mon Aug 21 01:03:24 2006 Tim Janik <timj gtk org>
+
+ * birnetutils.h, birnetutils.c: added birnet_memset4(), a function to
+ fill large memory regions with data of 32bit integer width.
+
Tue Jul 18 01:14:22 2006 Tim Janik <timj gtk org>
* birnetthreadxx.cc: use birnet_*__chain4init() and
Modified: trunk/birnet/birnetutils.c
===================================================================
--- trunk/birnet/birnetutils.c 2006-08-16 16:14:36 UTC (rev 3858)
+++ trunk/birnet/birnetutils.c 2006-08-21 22:08:23 UTC (rev 3859)
@@ -25,6 +25,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <wchar.h>
#ifndef _
#define _(string) (string) // FIXME
@@ -269,6 +270,18 @@
return cleanup->id;
}
+/* --- string utils --- */
+void
+birnet_memset4 (guint32 *mem,
+ guint32 filler,
+ guint length)
+{
+ BIRNET_STATIC_ASSERT (sizeof (*mem) == 4);
+ BIRNET_STATIC_ASSERT (sizeof (filler) == 4);
+ BIRNET_STATIC_ASSERT (sizeof (wchar_t) == 4);
+ wmemset ((wchar_t*) mem, filler, length);
+}
+
/* --- file testing --- */
static int
errno_check_file (const char *file_name,
Modified: trunk/birnet/birnetutils.h
===================================================================
--- trunk/birnet/birnetutils.h 2006-08-16 16:14:36 UTC (rev 3858)
+++ trunk/birnet/birnetutils.h 2006-08-21 22:08:23 UTC (rev 3859)
@@ -38,6 +38,10 @@
void *data);
void birnet_cleanup_force_handlers (void);
+/* --- string utils --- */
+void birnet_memset4 (guint32 *mem,
+ guint32 filler,
+ guint length);
/* --- file testing --- */
bool birnet_file_check (const gchar *file, /* returns errno */
const gchar *mode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]