Exemple #1
0
term_t cbif_demonitor1(proc_t *proc, term_t *regs)
{
	term_t MonRef = regs[0];
	if (!is_boxed(MonRef) || boxed_tag(peel_boxed(MonRef)) != SUBTAG_REF)
		badarg(MonRef);
	if (!ref_is_local(MonRef))
		badarg(MonRef);

	if (demonitor(local_ref_id(MonRef), proc->pid) < 0)
		badarg(MonRef);

	return A_TRUE;
}
 /// Removes a monitor from `whom`.
 inline void demonitor(const actor& whom) {
   demonitor(whom.address());
 }