-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for unregister/1
#364
Conversation
31e5b97
to
bcb425d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's cleanup history before merging.
733a4ec
to
cdb26de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR git history is not clean yet, let's get in touch and work together on this :)
ca6fff6
to
3da3a81
Compare
Signed-off-by: Winford <dwinford@pm.me>
Signed-off-by: Winford <dwinford@pm.me>
Adds checks that pid is an active process, atom is not already registered to a process, and the atom name is not the "undefined" atom. Signed-off-by: Winford <dwinford@pm.me>
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
`register/2` and `unregister/1` functions are tested for correct returns, functionality, and proper error returns. Signed-off-by: Winford <dwinford@pm.me>
Exposes a native elixir interface to unregister/1. Signed-off-by: Winford <dwinford@pm.me>
3da3a81
to
e7a134e
Compare
Add support for `unregister/1` These changes add `unregister/1` as well as some minor enhancements to error returns to match expected otp behavior, and address the TODOs in the `nif_erlang_register_2` function in src/libAtomVM.nifs.c. Also adds test for `register/2` and `unregister/1` return values, functionality, and error returns - designed to test the conditions raised in the previously addressed TODOs (existing process pid, not already registered, not the atom "undefined"). Closes issue #358 These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
Merged with some minor git history and CHANGELOG cleanups. |
These changes add
unregister/1
as well as some minor enhancements to error returns to match expected otp behavior, and address the TODOs in thenif_erlang_register_2
function in src/libAtomVM.nifs.c. Also adds test forregister/2
andunregister/1
return values, functionality, and error returns - designed to test the conditions raised in the previously addressed TODOs (existing process pid, not already registered, not the atom "undefined").Closes issue #358
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later