Esempio n. 1
0
PTP_POOL GetDefaultThreadpool()
{
	PTP_POOL pool = NULL;

	pool = &DEFAULT_POOL;

	if (!InitializeThreadpool(pool))
		return NULL;

	return pool;
}
Esempio n. 2
0
PTP_POOL winpr_CreateThreadpool(PVOID reserved)
{
	PTP_POOL pool = NULL;
#ifdef _WIN32
	InitOnceExecuteOnce(&init_once_module, init_module, NULL, NULL);
	if (pCreateThreadpool)
		return pCreateThreadpool(reserved);
#endif
	if (!(pool = (PTP_POOL) calloc(1, sizeof(TP_POOL))))
		return NULL;

	if (!InitializeThreadpool(pool))
	{
		free(pool);
		return NULL;
	}

	return pool;
}
Esempio n. 3
0
File: pool.c Progetto: cgull/FreeRDP
PTP_POOL CreateThreadpool(PVOID reserved)
{
    PTP_POOL pool = NULL;

#ifdef _WIN32
    module_init();

    if (pCreateThreadpool)
        return pCreateThreadpool(reserved);
#else
    if (!(pool = (PTP_POOL) calloc(1, sizeof(TP_POOL))))
        return NULL;

    if (!InitializeThreadpool(pool))
    {
        free(pool);
        return NULL;
    }
#endif

    return pool;
}