Add files via upload
This commit is contained in:
parent
29fc429d9a
commit
731c518cff
|
@ -1052,7 +1052,7 @@ void *blas_memory_alloc(int procpos){
|
||||||
mypos = WhereAmI();
|
mypos = WhereAmI();
|
||||||
|
|
||||||
position = mypos;
|
position = mypos;
|
||||||
while (position > NUM_BUFFERS) position >>= 1;
|
while (position >= NUM_BUFFERS) position >>= 1;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!memory[position].used && (memory[position].pos == mypos)) {
|
if (!memory[position].used && (memory[position].pos == mypos)) {
|
||||||
|
@ -1201,8 +1201,8 @@ void blas_memory_free(void *free_area){
|
||||||
position = 0;
|
position = 0;
|
||||||
LOCK_COMMAND(&alloc_lock);
|
LOCK_COMMAND(&alloc_lock);
|
||||||
|
|
||||||
while ((memory[position].addr != free_area)
|
while ((position < NUM_BUFFERS) && (memory[position].addr != free_area))
|
||||||
&& (position < NUM_BUFFERS)) position++;
|
position++;
|
||||||
|
|
||||||
if (memory[position].addr != free_area) goto error;
|
if (memory[position].addr != free_area) goto error;
|
||||||
|
|
||||||
|
@ -1516,12 +1516,30 @@ static int on_process_term(void)
|
||||||
#else
|
#else
|
||||||
#pragma comment(linker, "/INCLUDE:__tls_used")
|
#pragma comment(linker, "/INCLUDE:__tls_used")
|
||||||
#endif
|
#endif
|
||||||
#pragma data_seg(push, old_seg)
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
#pragma const_seg(".CRT$XLB")
|
||||||
|
#else
|
||||||
#pragma data_seg(".CRT$XLB")
|
#pragma data_seg(".CRT$XLB")
|
||||||
|
#endif
|
||||||
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
|
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
|
||||||
|
#ifdef _WIN64
|
||||||
|
#pragma const_seg()
|
||||||
|
#else
|
||||||
|
#pragma data_seg()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
#pragma const_seg(".CRT$XTU")
|
||||||
|
#else
|
||||||
#pragma data_seg(".CRT$XTU")
|
#pragma data_seg(".CRT$XTU")
|
||||||
|
#endif
|
||||||
static int(*p_process_term)(void) = on_process_term;
|
static int(*p_process_term)(void) = on_process_term;
|
||||||
#pragma data_seg(pop, old_seg)
|
#ifdef _WIN64
|
||||||
|
#pragma const_seg()
|
||||||
|
#else
|
||||||
|
#pragma data_seg()
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64))
|
#if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64))
|
||||||
|
|
Loading…
Reference in New Issue