Add some spin lock related doxygen #447
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!447
Loading…
Reference in a new issue
No description provided.
Delete branch "spin_lock_doxygen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fixes #445
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hspim??
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.h"These spin locks are share," -> "These spin locks are shared," ?
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.h"Each reserved spin lock use individually" -> "Each reserved spin lock used individually" ?
@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11Says
default=12here, but then#define PICO_SPINLOCK_ID_OS1 14below?@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11Says
default=13here, but then#define PICO_SPINLOCK_ID_OS2 15below?If it's now
min=0(whereas previously it wasmin=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?
I don't think you need the
lock_numhere? e.g. line 319 just says:@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hClosing-parenthesis at the end of the line with no matching opening-parenthesis
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hProbably worth adding a
\refbeforenext_striped_spin_lock_num()?@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.h"first come first serve basis" -> "first come first served basis" ?
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.h"reserved for exclusive used" -> "reserved for exclusive use"
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hLooks like
\ref PICO_SPINLOCK_ID_CLAIM_FREE_LASTactually needs to be\ref PICO_SPINLOCK_ID_CLAIM_FREE_END? (which is unfortunately inconsistent withPICO_SPINLOCK_ID_STRIPED_LAST, but I guess it's too late to change it because of backwards-compatibility reasons?)holy cow; i swear i proof read this :-)
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hglorious spim
yes... frankly these are "advanced"
i'm happy with it
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hfixing
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hfixing .. not sure when these are really necessary - seems happy without
@ -18,15 +18,31 @@ extern "C" {/** \file hardware/sync.hyeah i'm going to rename because I doubt anyone has changed it... I am adding a compiler warning if the original has been redefined
@ -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 24PICO_SPINLOCK_ID_CLAIM_FREE_ENDhere needs to bePICO_SPINLOCK_ID_CLAIM_FREE_LAST😉@ -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 24damnit
@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11PICO_SPINLOCK_ID_OS1has an identical description toPICO_SPINLOCK_ID_OS2whichtools/extract_configs.pyisn't happy about. (I added this check because when we were first adding thesePICO_CONFIGentires, 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.@ -54,26 +70,39 @@ typedef volatile uint32_t spin_lock_t;#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11fixed (I made them different)
Yep if you are reallocating spinlocks then you had best read the surrounding comments!