This is not intended to be used within the realtime threads as both push and pop use a common semaphore. However, they are very fast so you'd probably get away with it :)

There are just two calls:

int miscMsgPush( string )

string miscMsgPop( int )

These calls are accessible to all parts of Yoshimi and provide a simple asynchonous means of passing text between threads and functions via just the integer ID.

Pushing a message will return the first available ID and Popping a message makes its ID available again.

There is a maximum of 254 possible entries at any one time, but it's unlikely that limit will ever be reached.

The ID 255 (which has the global ID of NO_MSG) is a 'do nothing' reserved for calls that might want to send a message... but then again might not :)

If you push an empty string you'll get back NO_MSG, and popping NO_MSG will of course return an empty string.
