summaryrefslogtreecommitdiff
path: root/rtems/rtems_yaffs_os_glue.c
diff options
context:
space:
mode:
authorSebastien Bourdeauducq <sebastien@milkymist.org>2011-07-22 11:31:28 +0200
committerSebastien Bourdeauducq <sebastien@milkymist.org>2011-07-22 11:31:28 +0200
commit113c1217865682ab081ab8a2f7deabdaa9f9869f (patch)
tree3e94175c13f0d8835c8eb24894db3c52a004128b /rtems/rtems_yaffs_os_glue.c
parent2df51cdb98e799c4d10b4cc7dd7e8858aa79e7d8 (diff)
RTEMS support patch by Sebastian Huber
Diffstat (limited to 'rtems/rtems_yaffs_os_glue.c')
-rw-r--r--rtems/rtems_yaffs_os_glue.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/rtems/rtems_yaffs_os_glue.c b/rtems/rtems_yaffs_os_glue.c
new file mode 100644
index 0000000..7b3f6e9
--- /dev/null
+++ b/rtems/rtems_yaffs_os_glue.c
@@ -0,0 +1,46 @@
+/*
+ * YAFFS port to RTEMS
+ *
+ * Copyright (C) 2010, 2011 Sebastien Bourdeauducq
+ * Copyright (C) 2011 Stephan Hoffmann <sho@reLinux.de>
+ * Copyright (C) 2011 embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * As a special exception, linking other files with the object code from
+ * this one to produce an executable application does not by itself cause
+ * the resulting executable application to be covered by the GNU General
+ * Public License.
+ * This exception does not however invalidate any other reasons why the
+ * executable file might be covered by the GNU Public License. In particular,
+ * the other YAFFS files are not covered by this exception, and using them
+ * in a proprietary application requires a paid license from Aleph One.
+ */
+
+#include <stdlib.h>
+
+#include <rtems.h>
+
+#include "yaffs_trace.h"
+#include "yaffs_osglue.h"
+
+unsigned int yaffs_trace_mask = YAFFS_TRACE_BAD_BLOCKS | YAFFS_TRACE_ALWAYS;
+
+unsigned int yaffs_wr_attempts;
+
+void *yaffs_malloc(size_t size)
+{
+ return malloc(size);
+}
+
+void yaffs_free(void *ptr)
+{
+ free(ptr);
+}
+
+u32 yaffsfs_CurrentTime(void)
+{
+ return rtems_clock_get_ticks_since_boot();
+}