diff options
author | Hui Zhu <teawaterz@linux.alibaba.com> | 2021-01-19 14:43:13 +0800 |
---|---|---|
committer | Wu Fengguang <wfg@mail.ustc.edu.cn> | 2021-01-21 21:19:32 +0800 |
commit | ef16f000ce67ae825c98b85cb8fafc6a17e3de1a (patch) | |
tree | 698912969675c181d22b71142c619533e734c37d | |
parent | 8c931f0fe125d5d71f92cc38d764ba37044da857 (diff) | |
download | vm-scalability-ef16f000ce67ae825c98b85cb8fafc6a17e3de1a.tar.gz |
usemem: Remove the duplicate do_access
Got following error when build usemem:
gcc -O -c -Wall -g usemem.c -o usemem.o
usemem.c:451:15: error: redefinition of ‘do_access’
unsigned long do_access(unsigned long *p, unsigned long idx, int read)
^~~~~~~~~
usemem.c:332:15: note: previous definition of ‘do_access’ was here
unsigned long do_access(unsigned long *p, unsigned long idx, int read)
^~~~~~~~~
make: *** [usemem.o] Error 1
Remove the duplicate do_access to fix this error.
Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
-rw-r--r-- | usemem.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -329,18 +329,6 @@ void detach(void) } } -unsigned long do_access(unsigned long *p, unsigned long idx, int read) -{ - volatile unsigned long *vp = p; - - if (read) - return vp[idx]; /* read data */ - else { - vp[idx] = idx; /* write data */ - return 0; - } -} - unsigned long * allocate(unsigned long bytes) { unsigned long *p; |