def check_enough_semaphores():
    # minimum number of semaphores available according to POSIX
    nsems_min = 256
    try:
        nsems = os.sysconf("SC_SEM_NSEMS_MAX")
    except (AttributeError, ValueError):
        # sysconf not available or setting not available
        return
    if nsems == -1 or nsems >= nsems_min:
        return
    raise unittest.SkipTest("The OS doesn't support enough semaphores "
                            "to run the test (required: %d)." % nsems_min)


#
# Creates a wrapper for a function which records the time it takes to finish
#
Register the API `name` into the `api_register`.
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_multiprocessing.py/check_enough_semaphores--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/vendor/epydoc/docwriter/xlink.py/register_api