1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

saul/doc: Warn about and deprecate saul_reg_rm

saul_reg_rm can not be used safely unless in tight coordination with the
application. This points out the issue, puts the onus of making sure
nobody calls vanishing registrations on the device driver and deprecates
the call (as the requirements for correct usage are practically
impossible to fulfull for a generic driver).
This commit is contained in:
chrysn 2018-12-12 20:19:07 +01:00
parent a4530aaa68
commit 2c62fec96e

View File

@ -72,6 +72,16 @@ int saul_reg_add(saul_reg_t *dev);
/**
* @brief Unregister a device from the SAUL registry
*
* @warning Removing the device at runtime can send applications that have
* looked up that device into invalid states, and should thus be
* avoided.
*
* @warning This function must only be used by drivers that advise developers
* using them on how to prevent race conditions when using SAUL.
*
* @deprecated This function will be removed soon as it is practically unusable
* for the above reasons.
*
* @param[in] dev pointer to a registry entry
*
* @return 0 on success