I think by EXIT stamp you mean RE-ENTRY PERMIT, which is something totally different. You can get these either at an immigration office or at the airport. 1000 Baht for single, 3800 Baht for multi.
The conventions don't specify a time limit. They leave that up to the individual countries to apply their own maximum. Whilst most countries do state 90 days, for some reason Thailand doesn't, which effectively means any "temporary visitor" is ok. I think many will say 90 days as that used to be the maximum for any tourist, but now with the DTV that will have changed