forked from parallella/pal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_write.c
33 lines (31 loc) · 828 Bytes
/
p_write.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <pal.h>
/**
*
* Copies a block pointed to by 'src' into the memory objecct
* 'mem'.
*
* @param src A pointer to a block of memory
*
* @param nb Number of bytes to copy
*
* @param flags Bitmask field indicating runtime options
*
* ASYNC: Specifies asynchronous (non-blocking) operation.
* The default is blocking
*
* @param mem Reference to a memory object created with p_malloc();
*
* @return Returns 0? if successful. Negative value indicates error.
*
*/
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include "pal_base.h"
#include "pal_base_private.h"
ssize_t p_write(p_mem_t mem, const void *src, size_t nb, int flags)
{
printf("Running p_write(%p,%p,%d,%d)\n", mem, src, (int)nb, flags);
// memcpy(mem->memptr,src,nb);
return -ENOSYS;
}