On 03/20/14 14:36, Dimitry Sibiryakov wrote: > 20.03.2014 9:57, Alex Peshkoff wrote: >> Saving 2 atomic ops per thread enter/exit is not >> very much, but if we can do it why not. > Are you sure that acquiring mutex on every API call is two atomic ops?.. >
Acquiring mutex is anyway needed. Assigning reference pointer is one atomic op and nullifying/destroying in the end of call - another one. What about mutex. Not sure for windows (cause have no source code), in glibc conflict-less call to pthread_mutex_lock() is single atomic op. When conflict happens life is certainly more complex, system calls are done. But for this particular mutex possibility of conflict is very low as I've already said. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel