Example #1
0
Result y2rExit(void)
{
	Result ret = 0;

	if (initialized)
	{
		ret = Y2RU_DriverFinalize();
		if (ret < 0) return ret;
	}

	if (y2rHandle != 0)
	{
		ret = svcCloseHandle(y2rHandle);
		if (ret < 0) return ret;
		y2rHandle = 0;
	}

	return 0;
}
Example #2
0
void y2rExit(void)
{
	if (AtomicDecrement(&y2rRefCount)) return;
	Y2RU_DriverFinalize();
	svcCloseHandle(y2rHandle);
}