Add some spin lock related doxygen #447

Merged
kilograham merged 4 commits from spin_lock_doxygen into develop 2021-06-02 10:14:11 -05:00
kilograham commented 2021-05-25 15:27:16 -05:00 (Migrated from github.com)
No description provided.
kilograham commented 2021-05-25 15:27:59 -05:00 (Migrated from github.com)

fixes #445

fixes #445
lurch (Migrated from github.com) reviewed 2021-05-25 15:40:36 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 15:40:36 -05:00

spim??

spim??
lurch (Migrated from github.com) reviewed 2021-05-25 15:44:42 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 15:44:42 -05:00

"These spin locks are share," -> "These spin locks are shared," ?

"These spin locks are share," -> "These spin locks are shared," ?
lurch (Migrated from github.com) reviewed 2021-05-25 15:45:19 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 15:45:19 -05:00

"Each reserved spin lock use individually" -> "Each reserved spin lock used individually" ?

"Each reserved spin lock use individually" -> "Each reserved spin lock used individually" ?
lurch (Migrated from github.com) reviewed 2021-05-25 15:47:23 -05:00
@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;
#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11
lurch (Migrated from github.com) commented 2021-05-25 15:47:23 -05:00

Says default=12 here, but then #define PICO_SPINLOCK_ID_OS1 14 below?

Says `default=12` here, but then `#define PICO_SPINLOCK_ID_OS1 14` below?
lurch (Migrated from github.com) reviewed 2021-05-25 15:47:50 -05:00
@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;
#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11
lurch (Migrated from github.com) commented 2021-05-25 15:47:50 -05:00

Says default=13 here, but then #define PICO_SPINLOCK_ID_OS2 15 below?

Says `default=13` here, but then `#define PICO_SPINLOCK_ID_OS2 15` below?
lurch (Migrated from github.com) reviewed 2021-05-25 15:52:15 -05:00
lurch (Migrated from github.com) commented 2021-05-25 15:52:15 -05:00

If it's now min=0 (whereas previously it was min=16) does there need to be a preprocessor-check (or runtime assertion) that the striped spinlock range doesn't overlap with any of the fixed-purpose spinlocks? 🤷
Or is this just something that the developer needs to be careful of themselves?

If it's now `min=0` (whereas previously it was `min=16`) does there need to be a preprocessor-check (or runtime assertion) that the striped spinlock range doesn't overlap with any of the fixed-purpose spinlocks? :shrug: Or is this just something that the developer needs to be careful of themselves?
lurch (Migrated from github.com) reviewed 2021-05-25 15:56:30 -05:00
lurch (Migrated from github.com) commented 2021-05-25 15:56:30 -05:00

I don't think you need the lock_num here? e.g. line 319 just says:

* \return The spin lock instance
I don't think you need the `lock_num` here? e.g. line 319 just says: ``` * \return The spin lock instance ```
lurch (Migrated from github.com) reviewed 2021-05-25 15:59:26 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 15:59:26 -05:00

Closing-parenthesis at the end of the line with no matching opening-parenthesis

Closing-parenthesis at the end of the line with no matching opening-parenthesis
lurch (Migrated from github.com) reviewed 2021-05-25 16:00:38 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 16:00:38 -05:00

Probably worth adding a \ref before next_striped_spin_lock_num() ?

Probably worth adding a `\ref` before `next_striped_spin_lock_num()` ?
lurch (Migrated from github.com) reviewed 2021-05-25 16:02:18 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 16:02:18 -05:00

"first come first serve basis" -> "first come first served basis" ?

"first come first serve basis" -> "first come first served basis" ?
lurch (Migrated from github.com) reviewed 2021-05-25 16:03:06 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 16:03:06 -05:00

"reserved for exclusive used" -> "reserved for exclusive use"

"reserved for exclusive used" -> "reserved for exclusive use"
lurch (Migrated from github.com) reviewed 2021-05-25 16:07:33 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
lurch (Migrated from github.com) commented 2021-05-25 16:07:33 -05:00

Looks like \ref PICO_SPINLOCK_ID_CLAIM_FREE_LAST actually needs to be \ref PICO_SPINLOCK_ID_CLAIM_FREE_END ? (which is unfortunately inconsistent with PICO_SPINLOCK_ID_STRIPED_LAST, but I guess it's too late to change it because of backwards-compatibility reasons?)

Looks like `\ref PICO_SPINLOCK_ID_CLAIM_FREE_LAST` actually needs to be `\ref PICO_SPINLOCK_ID_CLAIM_FREE_END` ? (which is unfortunately inconsistent with `PICO_SPINLOCK_ID_STRIPED_LAST`, but I guess it's too late to change it because of backwards-compatibility reasons?)
kilograham commented 2021-05-25 17:11:57 -05:00 (Migrated from github.com)

holy cow; i swear i proof read this :-)

holy cow; i swear i proof read this :-)
kilograham (Migrated from github.com) reviewed 2021-05-25 17:12:17 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
kilograham (Migrated from github.com) commented 2021-05-25 17:12:17 -05:00

glorious spim

glorious spim
kilograham (Migrated from github.com) reviewed 2021-05-25 17:13:09 -05:00
kilograham (Migrated from github.com) commented 2021-05-25 17:13:09 -05:00

yes... frankly these are "advanced"

yes... frankly these are "advanced"
kilograham (Migrated from github.com) reviewed 2021-05-27 12:18:44 -05:00
kilograham (Migrated from github.com) commented 2021-05-27 12:18:43 -05:00

i'm happy with it

i'm happy with it
kilograham (Migrated from github.com) reviewed 2021-05-27 12:19:03 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
kilograham (Migrated from github.com) commented 2021-05-27 12:19:03 -05:00

fixing

fixing
kilograham (Migrated from github.com) reviewed 2021-05-27 12:20:01 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
kilograham (Migrated from github.com) commented 2021-05-27 12:20:00 -05:00

fixing .. not sure when these are really necessary - seems happy without

fixing .. not sure when these are really necessary - seems happy without
kilograham (Migrated from github.com) reviewed 2021-05-27 12:23:01 -05:00
@ -18,15 +18,31 @@ extern "C" {
/** \file hardware/sync.h
kilograham (Migrated from github.com) commented 2021-05-27 12:23:01 -05:00

yeah i'm going to rename because I doubt anyone has changed it... I am adding a compiler warning if the original has been redefined

yeah i'm going to rename because I doubt anyone has changed it... I am adding a compiler warning if the original has been redefined
lurch (Migrated from github.com) reviewed 2021-05-27 14:42:11 -05:00
@ -67,3 +93,3 @@
// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, Spinlock ID for claim free first, min=16, max=31, default=24, group=hardware_sync
// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, Lowest Spinlock ID in the 'claim free' range, min=0, max=31, default=24, group=hardware_sync
#ifndef PICO_SPINLOCK_ID_CLAIM_FREE_FIRST
#define PICO_SPINLOCK_ID_CLAIM_FREE_FIRST 24
lurch (Migrated from github.com) commented 2021-05-27 14:42:11 -05:00

PICO_SPINLOCK_ID_CLAIM_FREE_END here needs to be PICO_SPINLOCK_ID_CLAIM_FREE_LAST 😉

`PICO_SPINLOCK_ID_CLAIM_FREE_END` here needs to be `PICO_SPINLOCK_ID_CLAIM_FREE_LAST` :wink:
kilograham (Migrated from github.com) reviewed 2021-05-27 14:45:53 -05:00
@ -67,3 +93,3 @@
// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, Spinlock ID for claim free first, min=16, max=31, default=24, group=hardware_sync
// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, Lowest Spinlock ID in the 'claim free' range, min=0, max=31, default=24, group=hardware_sync
#ifndef PICO_SPINLOCK_ID_CLAIM_FREE_FIRST
#define PICO_SPINLOCK_ID_CLAIM_FREE_FIRST 24
kilograham (Migrated from github.com) commented 2021-05-27 14:45:53 -05:00

damnit

damnit
lurch (Migrated from github.com) reviewed 2021-05-27 14:49:37 -05:00
@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;
#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11
lurch (Migrated from github.com) commented 2021-05-27 14:49:37 -05:00

PICO_SPINLOCK_ID_OS1 has an identical description to PICO_SPINLOCK_ID_OS2 which tools/extract_configs.py isn't happy about. (I added this check because when we were first adding these PICO_CONFIG entires, there were a lot of copy'n'paste errors).
So you either need to make the descriptions slightly different, or you (or I?) need to take that "no duplicate descriptions" check out of tools/extract_configs.py.

`PICO_SPINLOCK_ID_OS1` has an identical description to `PICO_SPINLOCK_ID_OS2` which `tools/extract_configs.py` isn't happy about. (I added this check because when we were first adding these `PICO_CONFIG` entires, there were a lot of copy'n'paste errors). So you either need to make the descriptions slightly different, or you (or I?) need to take that "no duplicate descriptions" check out of `tools/extract_configs.py`.
kilograham (Migrated from github.com) reviewed 2021-06-01 11:08:58 -05:00
@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;
#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11
kilograham (Migrated from github.com) commented 2021-06-01 11:08:58 -05:00

fixed (I made them different)

fixed (I made them different)
liamfraser (Migrated from github.com) approved these changes 2021-06-02 09:00:56 -05:00
Wren6991 (Migrated from github.com) reviewed 2021-06-02 10:12:35 -05:00
Wren6991 (Migrated from github.com) commented 2021-06-02 10:12:35 -05:00

Yep if you are reallocating spinlocks then you had best read the surrounding comments!

Yep if you are reallocating spinlocks then you had best read the surrounding comments!
Wren6991 (Migrated from github.com) approved these changes 2021-06-02 10:13:09 -05:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!447
No description provided.