Import rtems wrapper from rtems git
[yaffs2.git] / rtems / rtems_yaffs_os_glue.c
1 /*
2  * YAFFS port to RTEMS
3  *
4  * Copyright (C) 2010, 2011 Sebastien Bourdeauducq
5  * Copyright (C) 2011 Stephan Hoffmann <sho@reLinux.de>
6  * Copyright (C) 2011 embedded brains GmbH <rtems@embedded-brains.de>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  *
12  * As a special exception, linking other files with the object code from
13  * this one to produce an executable application does not by itself cause
14  * the resulting executable application to be covered by the GNU General
15  * Public License.
16  * This exception does not however invalidate any other reasons why the
17  * executable file might be covered by the GNU Public License. In particular,
18  * the other YAFFS files are not covered by this exception, and using them
19  * in a proprietary application requires a paid license from Aleph One.
20  */
21
22 #include <stdlib.h>
23 #include <time.h>
24
25 #include "yaffs_trace.h"
26 #include "yaffs_osglue.h"
27
28 unsigned int yaffs_trace_mask = YAFFS_TRACE_BAD_BLOCKS | YAFFS_TRACE_ALWAYS;
29
30 unsigned int yaffs_wr_attempts;
31
32 void *yaffsfs_malloc(size_t size)
33 {
34         return malloc(size);
35 }
36
37 void yaffsfs_free(void *ptr)
38 {
39         free(ptr);
40 }
41
42 u32 yaffsfs_CurrentTime(void)
43 {
44         return time(NULL);
45 }