Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c5b55c1dfe58
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5b7e0681579b
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 29, 2016

  1. artiq_devtool: fix incorrect use of nargs in argparse.

    whitequark committed Nov 29, 2016
    Copy the full SHA
    852598c View commit details
  2. Copy the full SHA
    5b7e068 View commit details
Showing with 10 additions and 8 deletions.
  1. +3 −3 artiq/frontend/artiq_devtool.py
  2. +4 −2 artiq/runtime.rs/src/kernel.rs
  3. +3 −3 artiq/runtime.rs/src/session.rs
6 changes: 3 additions & 3 deletions artiq/frontend/artiq_devtool.py
Original file line number Diff line number Diff line change
@@ -22,13 +22,13 @@ def get_argparser():

verbosity_args(parser)

parser.add_argument("--host", nargs=1, metavar="HOST",
parser.add_argument("--host", metavar="HOST",
type=str, default="lab.m-labs.hk",
help="SSH host where the development board is located")
parser.add_argument("--serial", nargs=1, metavar="SERIAL",
parser.add_argument("--serial", metavar="SERIAL",
type=str, default="/dev/ttyUSB0",
help="TTY device corresponding to the development board")
parser.add_argument("--ip", nargs=1, metavar="IP",
parser.add_argument("--ip", metavar="IP",
type=str, default="kc705.lab.m-labs.hk",
help="IP address corresponding to the development board")

6 changes: 4 additions & 2 deletions artiq/runtime.rs/src/kernel.rs
Original file line number Diff line number Diff line change
@@ -21,9 +21,11 @@ pub unsafe fn start() {
rpc_queue::init();
}

pub fn stop() {
unsafe { csr::kernel_cpu::reset_write(1) }
pub unsafe fn stop() {
csr::kernel_cpu::reset_write(1);

mailbox::acknowledge();
rpc_queue::init();
}

pub fn validate(ptr: usize) -> bool {
6 changes: 3 additions & 3 deletions artiq/runtime.rs/src/session.rs
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ impl<'a> Session<'a> {

impl<'a> Drop for Session<'a> {
fn drop(&mut self) {
kernel::stop()
unsafe { kernel::stop() }
}
}

@@ -416,7 +416,7 @@ fn process_kern_message(waiter: Waiter,
}

&kern::RunFinished => {
kernel::stop();
unsafe { kernel::stop() }
session.kernel_state = KernelState::Absent;
unsafe { session.congress.cache.unborrow() }

@@ -428,7 +428,7 @@ fn process_kern_message(waiter: Waiter,
}

&kern::RunException { exception: ref exn, backtrace } => {
kernel::stop();
unsafe { kernel::stop() }
session.kernel_state = KernelState::Absent;
unsafe { session.congress.cache.unborrow() }