(nit) I think it's a common practice not to repeat macro arguments to avoid surprising behavior due to double execution of code; is there any reason you decided against it?
```suggestion:-2+0 const type *__shared = (object_shm); \ type *shared = (type *)__shared; \ session_object_t *__obj = CONTAINING_RECORD( shared, session_object_t, shm ); \ ```