forked from M-Labs/artiq
Commit missing parts of 9366a29
.
This commit is contained in:
parent
9366a29483
commit
cc45694f5a
@ -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:
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user