|
|
@ -19,7 +19,6 @@ module_database_add(struct module *module)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(module->socket_descriptor == -1);
|
|
|
|
assert(module->socket_descriptor == -1);
|
|
|
|
|
|
|
|
|
|
|
|
/* __sync_fetch_and_add is provided by GCC */
|
|
|
|
|
|
|
|
int f = __sync_fetch_and_add(&module_database_free_offset, 1);
|
|
|
|
int f = __sync_fetch_and_add(&module_database_free_offset, 1);
|
|
|
|
assert(f < MODULE_MAX_MODULE_COUNT);
|
|
|
|
assert(f < MODULE_MAX_MODULE_COUNT);
|
|
|
|
module_database[f] = module;
|
|
|
|
module_database[f] = module;
|
|
|
|