122-32000 Parallax Inc, 122-32000 Datasheet - Page 233

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
LOCKRET
Release lock back to lock pool, making it available for future
((PUB ┆ PRI))
Explanation
LOCKRET
manage resources that are user-defined and deemed mutually-exclusive.
lock, by ID, back to the Hub’s lock pool so that it may be reused by other cogs at a later time.
For example:
This example returns Lock 2 back to the Hub. This doesn’t prevent cogs from accessing
Lock 2 afterwards, it only allows the Hub to reassign it to cogs that call
Applications should be written such that locks are not accessed with
unless they are currently checked out.
See About Locks, page 230, and Suggested Rules for Locks, page 231 for information on the
typical use of locks and the
Note that user-defined resources are not actually locked by either the Hub or the checked-out
lock. The lock feature only provides a means for objects to cooperatively lock those
resources. It’s up to the objects themselves to decide on, and abide by, the rules of lock use
and what resource(s) will be governed by them. Additionally, the Hub does not directly
assign a lock to the cog that called
by a cog; any other cog can “return” locks to the pool of available locks. Also, any cog can
access any lock through the
checked out. Doing such things is generally not recommended because of the havoc it can
cause with other, well-behaved objects in the application.
See
LOCKRET
LOCKRET(2)
LOCKNEW
ID
is one of four lock commands (
is the ID (0 – 7) of the lock to return to the lock pool.
, page 230;
( ID )
LOCKCLR
LOCK
LOCKCLR
, page 228; and
xxx commands.
LOCKNEW
and
4: Spin Language Reference –
LOCKSET
LOCKNEW
, rather it simply marks it as being “checked out”
LOCKSET
,
commands even if those locks were never
LOCKRET
, page234 for more information.
,
LOCKNEW
LOCKSET
Propeller Manual v1.0 · Page 233
, and
requests.
LOCKNEW
LOCKSET
LOCKRET
LOCKCLR
in the future.
or
) used to
returns a
LOCKCLR

Related parts for 122-32000