version 1.25, 2004/08/28 12:50:30 |
version 1.31, 2015/08/04 06:20:45 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.24 2003/12/11 05:48:04 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.30 2013/06/13 18:40:31 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 91 static struct mathcap *remote_mc; |
|
Line 91 static struct mathcap *remote_mc; |
|
static int remote_mc_len; |
static int remote_mc_len; |
|
|
void mclist_to_mc(LIST mclist,struct mathcap *mc); |
void mclist_to_mc(LIST mclist,struct mathcap *mc); |
|
Obj asir_pop_one(); |
|
void asir_push_one(Obj); |
|
|
#if defined(VISUAL) |
#if defined(VISUAL) |
/* XXX : mainly used in engine2000/io.c, but declared here */ |
/* XXX : mainly used in engine2000/io.c, but declared here */ |
Line 123 static int available_cmo[] = { |
|
Line 125 static int available_cmo[] = { |
|
CMO_RATIONAL, |
CMO_RATIONAL, |
CMO_RECURSIVE_POLYNOMIAL, CMO_UNIVARIATE_POLYNOMIAL, |
CMO_RECURSIVE_POLYNOMIAL, CMO_UNIVARIATE_POLYNOMIAL, |
CMO_INDETERMINATE, |
CMO_INDETERMINATE, |
CMO_TREE, |
CMO_TREE, CMO_BIGFLOAT, |
0 |
0 |
}; |
}; |
|
|
Line 145 static int ox_asir_available_sm[] = { |
|
Line 147 static int ox_asir_available_sm[] = { |
|
SM_executeStringByLocalParserInBatchMode, |
SM_executeStringByLocalParserInBatchMode, |
SM_executeFunction, SM_shutdown, SM_pops, |
SM_executeFunction, SM_shutdown, SM_pops, |
SM_mathcap, SM_setMathcap, SM_nop, |
SM_mathcap, SM_setMathcap, SM_nop, |
SM_beginBlock, SM_endBlock, |
SM_beginBlock, SM_endBlock, SM_executeFunctionSync, |
SM_set_rank_102, SM_tcp_accept_102, SM_tcp_connect_102, SM_reset_102, |
SM_set_rank_102, SM_tcp_accept_102, SM_tcp_connect_102, SM_reset_102, |
SM_bcast_102, SM_reduce_102, |
SM_bcast_102, SM_reduce_102, |
0 |
0 |
Line 404 void end_critical() { |
|
Line 406 void end_critical() { |
|
} |
} |
} |
} |
|
|
extern FUNC registered_handler; |
extern NODE user_int_handler; |
|
|
void ox_usr1_handler(int sig) |
void ox_usr1_handler(int sig) |
{ |
{ |
|
NODE t; |
|
|
#if !defined(VISUAL) |
#if !defined(VISUAL) |
signal(SIGUSR1,ox_usr1_handler); |
signal(SIGUSR1,ox_usr1_handler); |
#endif |
#endif |
Line 416 void ox_usr1_handler(int sig) |
|
Line 420 void ox_usr1_handler(int sig) |
|
ox_usr1_sent = 1; |
ox_usr1_sent = 1; |
} else { |
} else { |
ox_flushing = 1; |
ox_flushing = 1; |
if ( registered_handler ) { |
if ( user_int_handler ) { |
fprintf(stderr, |
fprintf(stderr, |
"usr1 : calling the registered exception handler..."); |
"usr1 : calling the registered exception handlers..."); |
bevalf(registered_handler,0); |
for ( t = user_int_handler; t; t = NEXT(t) ) |
|
bevalf((FUNC)BDY(t),0); |
fprintf(stderr, "done.\n"); |
fprintf(stderr, "done.\n"); |
} |
} |
ox_resetenv("usr1 : return to toplevel by SIGUSR1"); |
ox_resetenv("usr1 : return to toplevel by SIGUSR1"); |
Line 459 void wait_for_data(int s) |
|
Line 464 void wait_for_data(int s) |
|
{ |
{ |
return; |
return; |
} |
} |
|
|
|
void wait_for_data_102(int rank) |
|
{ |
|
return; |
|
} |
#else |
#else |
int ox_data_is_available(int s) |
int ox_data_is_available(int s) |
{ |
{ |
Line 511 void ox_send_data(int s,pointer p) |
|
Line 521 void ox_send_data(int s,pointer p) |
|
ERR err; |
ERR err; |
|
|
if ( ox_check && !ox_check_cmo(s,(Obj)p) ) { |
if ( ox_check && !ox_check_cmo(s,(Obj)p) ) { |
create_error(&err,ox_serial,"ox_send_data : Mathcap violation"); |
create_error(&err,ox_serial,"ox_send_data : Mathcap violation",0); |
p = (pointer)err; |
p = (pointer)err; |
} |
} |
begin_critical(); |
begin_critical(); |
Line 864 int ox_check_cmo(int s, Obj obj) |
|
Line 874 int ox_check_cmo(int s, Obj obj) |
|
return check_by_mc(s,OX_DATA,CMO_ZZ); |
return check_by_mc(s,OX_DATA,CMO_ZZ); |
else |
else |
return check_by_mc(s,OX_DATA,CMO_QQ); |
return check_by_mc(s,OX_DATA,CMO_QQ); |
case N_R: |
case N_R: case N_B: |
return 1; |
return 1; |
default: |
default: |
return 0; |
return 0; |