Skip to content

Commit

Permalink
Commit missing parts of 9366a29.
Browse files Browse the repository at this point in the history
whitequark committed Jan 10, 2016
1 parent 9366a29 commit cc45694
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions artiq/coredevice/core.py
Original file line number Diff line number Diff line change
@@ -38,15 +38,15 @@ def rtio_get_counter() -> TInt64:
raise NotImplementedError("syscall not simulated")

@syscall
def cache_get(TStr) -> TList(TInt32):
def cache_get(key: TStr) -> TList(TInt32):
raise NotImplementedError("syscall not simulated")

@syscall
def cache_put(TStr, TList(TInt32)):
def cache_put(key: TStr, value: TList(TInt32)):
raise NotImplementedError("syscall not simulated")

@syscall
def cache_clear(TStr):
def cache_clear(key: TStr):
raise NotImplementedError("syscall not simulated")

class Core:
11 changes: 7 additions & 4 deletions artiq/runtime/session.c
Original file line number Diff line number Diff line change
@@ -1036,10 +1036,13 @@ static int process_kmsg(struct msg_base *umsg)
}

if(!row->borrowed) {
row->length = request->length;
row->elements = calloc(row->length, sizeof(int32_t));
memcpy(row->elements, request->elements,
sizeof(int32_t) * row->length);
if(request->length != 0) {
row->length = request->length;
row->elements = calloc(row->length, sizeof(int32_t));
memcpy(row->elements, request->elements,
sizeof(int32_t) * row->length);
}

reply.succeeded = 1;
} else {
reply.succeeded = 0;

0 comments on commit cc45694

Please sign in to comment.