I have no comment on the functionality. But "xstat" is probably a poor choice of name. There is precedent for that function name with different meaning in the userland APIs. (It's a moderately useless meaning inherited from SVR4, but regardless overloading a name previously used is unwise.)
Thanks, Roland