guoxx

Results 2 issues of guoxx

## Summary normalmap and twosided not working well with aov integrators. I want to export surface normal for debugging/denoising purpose, however normalmap and twosided is implemented as a bsdf in...

- Fix shadowing of 'retval' variable in core_count() to ensure correct error handling. - Replace pthread_getaffinity_np with sched_getaffinity for better Linux compatibility.