Andrew Stubbs wrote:
The plan is that it will also be called from the GCN plugin. It doesn't need the BASIC_ALLOC_YIELD customization, so it didn't need the complication of the include stuff.

Hmm, OK.

It's not static on purpose. The code is "included" in gcn/allocator.c, but the initializer is called from gcn/team.c.

OK, missed that because 'basic_alloc_init' gets renamed and
it is not always easy to track it:

config/gcn/team.c:void __gcn_lowlat_init (void *heap, size_t size);
config/gcn/team.c:      __gcn_lowlat_init ((void*)(uintptr_t)(void 
__flat*)lowlat,
config/nvptx/team.c:void __nvptx_lowlat_init (void *heap, size_t size);
config/nvptx/team.c:      __nvptx_lowlat_init (shared_pool, shared_pool_size);

* * *

There's no real reason to use the builtins for the lock. I just did that because the code originated with the basic_alloc that was designed to carefully pack the descriptors into low-latency memory as efficiently as possible.  It can use the generic gomp_mutex.

I think that's more sensible – as it avoids implicit reliance on the availability of the SYNC macros.

* * *

Fair enough; let's use the "gomp_" namespace.

Thanks.

Is the attached OK?

LGTM.

Thanks,

Tobias

Reply via email to