Add support for Solaris 2.6 on sun4m builds
It is an excellent platform for catching bugs: big-endian, slow enough that a context switch in the middle of an operation becomes a regular occurrence, and all that on a SMP box. Or: I just wanted to see if it would work. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									47920df65c
								
							
						
					
					
						commit
						fda285e2f5
					
				
					 52 changed files with 1266 additions and 4197 deletions
				
			
		| 
						 | 
				
			
			@ -16,6 +16,15 @@
 | 
			
		|||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  typedef struct nn_udpv4mcgen_address {
 | 
			
		||||
    /* base IPv4 MC address is ipv4, host bits are bits base .. base+count-1, this machine is bit idx */
 | 
			
		||||
    struct in_addr ipv4;
 | 
			
		||||
    uint8_t base;
 | 
			
		||||
    uint8_t count;
 | 
			
		||||
    uint8_t idx; /* must be last: then sorting will put them consecutively */
 | 
			
		||||
  } nn_udpv4mcgen_address_t;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int ddsi_udp_init (void);
 | 
			
		||||
 | 
			
		||||
#if defined (__cplusplus)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -62,14 +62,6 @@ typedef struct {
 | 
			
		|||
  unsigned char address[16];
 | 
			
		||||
} nn_locator_t;
 | 
			
		||||
 | 
			
		||||
typedef struct nn_udpv4mcgen_address {
 | 
			
		||||
  /* base IPv4 MC address is ipv4, host bits are bits base .. base+count-1, this machine is bit idx */
 | 
			
		||||
  struct in_addr ipv4;
 | 
			
		||||
  uint8_t base;
 | 
			
		||||
  uint8_t count;
 | 
			
		||||
  uint8_t idx; /* must be last: then sorting will put them consecutively */
 | 
			
		||||
} nn_udpv4mcgen_address_t;
 | 
			
		||||
 | 
			
		||||
#define NN_STATUSINFO_DISPOSE      0x1u
 | 
			
		||||
#define NN_STATUSINFO_UNREGISTER   0x2u
 | 
			
		||||
#define NN_STATUSINFO_STANDARDIZED (NN_STATUSINFO_DISPOSE | NN_STATUSINFO_UNREGISTER)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,6 +23,7 @@
 | 
			
		|||
#include "dds/ddsi/q_config.h"
 | 
			
		||||
#include "dds/ddsi/q_addrset.h"
 | 
			
		||||
#include "dds/ddsi/q_globals.h" /* gv.mattr */
 | 
			
		||||
#include "dds/ddsi/ddsi_udp.h" /* nn_mc4gen_address_t */
 | 
			
		||||
 | 
			
		||||
/* So what does one do with const & mutexes? I need to take lock in a
 | 
			
		||||
   pure function just in case some other thread is trying to change
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,6 +41,7 @@
 | 
			
		|||
#include "dds/ddsi/ddsi_serdata_default.h"
 | 
			
		||||
#include "dds/ddsi/ddsi_mcgroup.h"
 | 
			
		||||
#include "dds/ddsi/q_receive.h"
 | 
			
		||||
#include "dds/ddsi/ddsi_udp.h" /* nn_mc4gen_address_t */
 | 
			
		||||
 | 
			
		||||
#include "dds/ddsi/sysdeps.h"
 | 
			
		||||
#include "dds__whc.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,6 +28,7 @@
 | 
			
		|||
#include "dds/ddsi/q_time.h"
 | 
			
		||||
#include "dds/ddsi/q_xmsg.h"
 | 
			
		||||
#include "dds/ddsi/ddsi_vendor.h"
 | 
			
		||||
#include "dds/ddsi/ddsi_udp.h" /* nn_mc4gen_address_t */
 | 
			
		||||
 | 
			
		||||
#include "dds/ddsi/q_config.h"
 | 
			
		||||
#include "dds/ddsi/q_globals.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,16 +38,6 @@
 | 
			
		|||
#include "dds/ddsi/sysdeps.h"
 | 
			
		||||
#include "dds__whc.h"
 | 
			
		||||
 | 
			
		||||
#if __STDC_VERSION__ >= 199901L
 | 
			
		||||
#define POS_INFINITY_DOUBLE INFINITY
 | 
			
		||||
#elif defined HUGE_VAL
 | 
			
		||||
/* Hope for the best -- the only consequence of getting this wrong is
 | 
			
		||||
   that T_NEVER may be printed as a fugly value instead of as +inf. */
 | 
			
		||||
#define POS_INFINITY_DOUBLE (HUGE_VAL + HUGE_VAL)
 | 
			
		||||
#else
 | 
			
		||||
#define POS_INFINITY_DOUBLE 1e1000
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static const struct wr_prd_match *root_rdmatch (const struct writer *wr)
 | 
			
		||||
{
 | 
			
		||||
  return ddsrt_avl_root (&wr_readers_treedef, &wr->readers);
 | 
			
		||||
| 
						 | 
				
			
			@ -310,7 +300,7 @@ struct nn_xmsg *writer_hbcontrol_piggyback (struct writer *wr, const struct whc_
 | 
			
		|||
    DDS_TRACE("heartbeat(wr "PGUIDFMT"%s) piggybacked, resched in %g s (min-ack %"PRId64"%s, avail-seq %"PRId64", xmit %"PRId64")\n",
 | 
			
		||||
            PGUID (wr->e.guid),
 | 
			
		||||
            *hbansreq ? "" : " final",
 | 
			
		||||
            (hbc->tsched.v == T_NEVER) ? POS_INFINITY_DOUBLE : (double) (hbc->tsched.v - tnow.v) / 1e9,
 | 
			
		||||
            (hbc->tsched.v == T_NEVER) ? INFINITY : (double) (hbc->tsched.v - tnow.v) / 1e9,
 | 
			
		||||
            ddsrt_avl_is_empty (&wr->readers) ? -1 : root_rdmatch (wr)->min_seq,
 | 
			
		||||
            ddsrt_avl_is_empty (&wr->readers) || root_rdmatch (wr)->all_have_replied_to_hb ? "" : "!",
 | 
			
		||||
            whcst->max_seq, READ_SEQ_XMIT(wr));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,14 +48,6 @@
 | 
			
		|||
   != 0 -- and note that it had better be 2's complement machine! */
 | 
			
		||||
#define TSCHED_DELETE ((int64_t) ((uint64_t) 1 << 63))
 | 
			
		||||
 | 
			
		||||
#if __STDC_VERSION__ >= 199901L
 | 
			
		||||
#define POS_INFINITY_DOUBLE INFINITY
 | 
			
		||||
#else
 | 
			
		||||
/* Hope for the best -- the only consequence of getting this wrong is
 | 
			
		||||
   that T_NEVER may be printed as a fugly value instead of as +inf. */
 | 
			
		||||
#define POS_INFINITY_DOUBLE (HUGE_VAL + HUGE_VAL)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
enum xeventkind
 | 
			
		||||
{
 | 
			
		||||
  XEVK_HEARTBEAT,
 | 
			
		||||
| 
						 | 
				
			
			@ -623,7 +615,7 @@ static void handle_xevk_heartbeat (struct nn_xpack *xp, struct xevent *ev, nn_mt
 | 
			
		|||
          PGUID (wr->e.guid),
 | 
			
		||||
          hbansreq ? "" : " final",
 | 
			
		||||
          msg ? "sent" : "suppressed",
 | 
			
		||||
          (t_next.v == T_NEVER) ? POS_INFINITY_DOUBLE : (double)(t_next.v - tnow.v) / 1e9,
 | 
			
		||||
          (t_next.v == T_NEVER) ? INFINITY : (double)(t_next.v - tnow.v) / 1e9,
 | 
			
		||||
          ddsrt_avl_is_empty (&wr->readers) ? (seqno_t) -1 : ((struct wr_prd_match *) ddsrt_avl_root_non_empty (&wr_readers_treedef, &wr->readers))->min_seq,
 | 
			
		||||
          ddsrt_avl_is_empty (&wr->readers) || ((struct wr_prd_match *) ddsrt_avl_root_non_empty (&wr_readers_treedef, &wr->readers))->all_have_replied_to_hb ? "" : "!",
 | 
			
		||||
          whcst.max_seq, READ_SEQ_XMIT(wr));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue