[Gc] gctest: use of AO_fetch_and_add1

Ivan Maidanski ivmai at mail.ru
Sat May 23 14:25:49 PDT 2009


Hi!

AO_fetch_and_add1_full() has been replaced back with LOCK/UNLOCK recently.
But using LOCK/UNLOCK requires GC_allocate_ml to be exported from DLL/DSO (which isn't (in my tree) since diff33 (Nov 01)). I think it's not worth exporting privates just for gctest (and whose use could be somehow avoided).

In the attached patch for test.c, I suggest checking for AO_HAVE_fetch_and_add1_full and falling back to LOCK/UNLOCK if missing.

Other solutions possible like having own GC_allocate_ml var in test.c.

Bye.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff85
Type: application/octet-stream
Size: 1061 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090524/afe971d1/diff85.obj


More information about the Gc mailing list