/uspace/trunk/libc/generic/time.c |
---|
73,7 → 73,7 |
printf("Failed to initialize timeofday memarea\n"); |
_exit(1); |
} |
if (rights != (AS_AREA_READ | AS_AREA_CACHEABLE)) { |
if (! (rights & AS_AREA_READ)) { |
printf("Received bad rights on time area: %X\n", |
rights); |
as_area_destroy(mapping); |
/uspace/trunk/libc/generic/async.c |
---|
623,6 → 623,27 |
return (aid_t) msg; |
} |
/** Send message and return id of the sent message |
* |
* The return value can be used as input for async_wait() to wait |
* for completion. |
*/ |
aid_t async_send_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, |
ipcarg_t arg3, ipc_call_t *dataptr) |
{ |
amsg_t *msg; |
msg = malloc(sizeof(*msg)); |
msg->done = 0; |
msg->dataptr = dataptr; |
msg->wdata.active = 1; /* We may sleep in next method, but it |
* will use it's own mechanism */ |
ipc_call_async_3(phoneid,method,arg1,arg2,arg3, msg,reply_received,1); |
return (aid_t) msg; |
} |
/** Wait for a message sent by async framework |
* |
* @param amsgid Message ID to wait for |
/uspace/trunk/libc/generic/mmap.c |
---|
33,15 → 33,15 |
void *mmap(void *start, size_t length, int prot, int flags, int fd, |
off_t offset) |
{ |
int rc; |
if (!start) |
start = as_get_mappable_page(length); |
prot |= AS_AREA_CACHEABLE; |
// if (! ((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE))) |
// return NULL; |
// return MAP_FAILED; |
if (! (flags & MAP_ANONYMOUS)) |
return NULL; |
return MAP_FAILED; |
return as_area_create(start, length, prot); |
} |