Commit graph

58 commits

Author SHA1 Message Date
Jorge Aparicio
c749979c45 add some tests 2019-02-26 23:22:34 +01:00
Jorge Aparicio
73529ea650 reject duplicate arguments in #[interrupt] and #[exception]
This program was being accepted:

``` rust
 #[task(
    capacity = 1,
    capacity = 2,
    priority = 1,
    priority = 2,
)]
fn foo() {}
```

now it will trigger a compiler error
2019-02-23 22:35:29 +01:00
Jorge Aparicio
7ce052be37 cargo fmt 2019-02-16 00:26:07 +01:00
Jorge Aparicio
89c922079e update examples and tests 2019-02-12 15:08:46 +01:00
Jorge Aparicio
557a51ede1 forbid early returns in init 2019-02-12 11:07:15 +01:00
Jorge Aparicio
8e9a91d0b0 properly handle #[cfg] (conditional compilation) on tasks 2018-12-16 19:10:36 +01:00
Jorge Aparicio
4345c10596 properly handle #[cfg] (conditional compilation) on resources 2018-12-16 18:37:36 +01:00
Jorge Aparicio
3413d8d7e8 remove no longer necessary feature gates 2018-12-15 19:08:32 +01:00
Jorge Aparicio
22d758ddac fix codegen 2018-11-04 19:46:49 +01:00
Jorge Aparicio
c631049efc v0.4.0
closes #32
closes #33
2018-11-03 17:16:55 +01:00
Jorge Aparicio
abca829926 more fixes 2018-08-24 16:31:04 +02:00
Jorge Aparicio
efca108103 cargo fmt 2018-04-16 21:32:52 +02:00
Jorge Aparicio
7fdf16eab9 update parser
closes #69

this doesn't change functionality per se but improves diagnostics in some cases. Some hard errors
have becomes warnings, for example: when `resources` is empty, or when `idle.path` is set to the
default `idle` path.
2018-04-16 21:32:29 +02:00
Jorge Aparicio
d30bdcb096 safe &'static mut references via init.resources 2017-12-09 17:17:56 +01:00
Jorge Aparicio
a6dd004113 implement the Resource trait for owned resources
this unbreaks the "generics" example
2017-12-09 17:17:56 +01:00
Jorge Aparicio
62c5c1ae43 make resource proxies not Sync 2017-12-09 16:13:22 +01:00
Jorge Aparicio
8f23fdc934 deny warnings and unsafe code in tests and examples 2017-12-09 15:12:42 +01:00
Jorge Aparicio
9865a7246d make resource proxies !Send 2017-12-09 15:10:29 +01:00
Jorge Aparicio
79e2b7dc2e rename LateResourceValues to LateResources 2017-12-09 13:20:41 +01:00
Jorge Aparicio
8e523d036c fix cfail tests 2017-12-08 13:28:27 +01:00
Jorge Aparicio
e90cf07dd6 fix ci 2017-11-22 09:40:36 +01:00
Jonas Schievink
be1a27ccf9 Add cfail test for late resources 2017-09-22 18:21:12 +02:00
Jonas Schievink
b1777ebd68 Fix warning in wrong-threshold cfail test 2017-09-22 13:46:30 +02:00
Jonas Schievink
21d1f6b9ad Don't use deprecated method to create compiletest config 2017-09-22 13:46:05 +02:00
Jorge Aparicio
271df39bdb Send-ness check is now in rtfm-core 2017-07-27 21:30:24 -05:00
Jorge Aparicio
d396da5950 make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate
to the procedural macro logic
2017-07-27 17:08:42 -05:00
Jorge Aparicio
aa22494549 update tests and examples
with task! gone 3 types of errors / gotchas have been eliminated 🎉
2017-07-27 11:40:15 -05:00
Jorge Aparicio
a14b0121b7 add another duplicated-handler cfail test 2017-07-24 22:52:12 -05:00
Jorge Aparicio
4139b47d4b add cfail test: borrow can't escape critical sections 2017-07-23 22:18:44 -05:00
Jorge Aparicio
6ea9cda663 update cfail tests 2017-07-23 20:51:58 -05:00
Jorge Aparicio
23425f2f06 more cfail tests 2017-07-20 16:16:40 -05:00
Jorge Aparicio
97a7e38db7 tasks / idle have exclusive access to Threshold, but do not own the token 2017-07-18 20:03:22 -05:00
Jorge Aparicio
1f1cf84ab4 add cfail tests 2017-07-18 15:14:39 -05:00
Jorge Aparicio
86a360a396 rtfm! macro take 2 2017-07-04 11:26:11 -05:00
Jorge Aparicio
c1a0f8173a require Resource protected data to be Send, make tokens !Send 2017-05-08 13:25:20 -05:00
Jorge Aparicio
fc4cb7d472 replace the ceiling token with a preemption threshold token 2017-05-08 12:05:42 -05:00
Jorge Aparicio
e2bde8d21a make the ceiling part of the task signature
remove the P.as_ceiling method
2017-04-27 19:28:27 -05:00
Jorge Aparicio
aa0347e36c fix cfail tests 2017-04-25 21:55:11 -05:00
Jorge Aparicio
8659ecea72 add a peripherals! macro
for safe declaration of `Peripheral`s

closes #12
2017-04-25 14:13:46 -05:00
Jorge Aparicio
39c111a59a change tasks! syntax to resemble struct initialization 2017-04-25 09:29:29 -05:00
Jorge Aparicio
d0ddc322e3 rename borrow to access 2017-04-21 21:38:39 -05:00
Jorge Aparicio
eea8030083 reword the comments in compile-fail tests 2017-04-21 21:24:28 -05:00
Jorge Aparicio
1c82f1b119 raise_to -> Ceiling.raise 2017-04-21 15:41:03 -05:00
Jorge Aparicio
3e165f2a42 drop lock methods, add raise_to function 2017-04-21 15:31:02 -05:00
Jorge Aparicio
4992db7877 more docs, remove Ceiling / Priority / Level traits 2017-04-21 00:24:54 -05:00
Jorge Aparicio
4e6818eb2c remove claim, add Priority.as_ceiling 2017-04-19 17:21:13 -05:00
Jorge Aparicio
0827c40a26 remove the _mut methods
they are too limited
2017-04-19 16:35:07 -05:00
Jorge Aparicio
aee3c2b29b critical: don't let the ceiling token escape the critical section 2017-04-19 15:03:49 -05:00
Jorge Aparicio
aee1d785a9 don't let the ceiling token escape the critical section 2017-04-19 14:15:18 -05:00
Jorge Aparicio
a94de6bafc wrap references to resources in static-ref's Ref/RefMut
to assert that they point to `static` data
2017-04-14 10:19:08 -05:00