First crack at adding atomic operation support
Bug fixes in knem support