forked from M-Labs/artiq
1
0
Fork 0

Commit missing parts of 9366a29.

This commit is contained in:
whitequark 2016-01-10 13:08:26 +00:00
parent 9366a29483
commit cc45694f5a
2 changed files with 10 additions and 7 deletions

View File

@ -38,15 +38,15 @@ def rtio_get_counter() -> TInt64:
raise NotImplementedError("syscall not simulated") raise NotImplementedError("syscall not simulated")
@syscall @syscall
def cache_get(TStr) -> TList(TInt32): def cache_get(key: TStr) -> TList(TInt32):
raise NotImplementedError("syscall not simulated") raise NotImplementedError("syscall not simulated")
@syscall @syscall
def cache_put(TStr, TList(TInt32)): def cache_put(key: TStr, value: TList(TInt32)):
raise NotImplementedError("syscall not simulated") raise NotImplementedError("syscall not simulated")
@syscall @syscall
def cache_clear(TStr): def cache_clear(key: TStr):
raise NotImplementedError("syscall not simulated") raise NotImplementedError("syscall not simulated")
class Core: class Core:

View File

@ -1036,10 +1036,13 @@ static int process_kmsg(struct msg_base *umsg)
} }
if(!row->borrowed) { if(!row->borrowed) {
row->length = request->length; if(request->length != 0) {
row->elements = calloc(row->length, sizeof(int32_t)); row->length = request->length;
memcpy(row->elements, request->elements, row->elements = calloc(row->length, sizeof(int32_t));
sizeof(int32_t) * row->length); memcpy(row->elements, request->elements,
sizeof(int32_t) * row->length);
}
reply.succeeded = 1; reply.succeeded = 1;
} else { } else {
reply.succeeded = 0; reply.succeeded = 0;