summaryrefslogtreecommitdiffstats
path: root/sys/message.c
blob: 7c871ce98646ab3245341c38c2aa520fdbe69cc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "message.h"
#include "hal/obj.h"

void *
message_data(jove_owned_obj_t *obj)
{
    uintptr_t objptr = (uintptr_t)obj_deref(obj);
    return (void*)(objptr & ~0xFFF);
}

size_t 
message_len(jove_owned_obj_t *obj)
{
    return (obj_getvalue(obj) & 0xFFF) << 12;
}