Don't presume thread-ids are integers:

Docs clearly start you shouldn't directly compare thread-ids since a thread-id, being an implementation defined opaque object, could easily be a struct or a pointer to a struct, etc. You should use the Hercules "equal_threads" macro which calls the implementation provided thread-id comparison function.
const
Merge branch 'master' of github.com:s390guy/hercules-390