~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to iocore/cluster/P_ClusterCacheInternal.h

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
  ClusterMachine *past_probes[CONFIGURATION_HISTORY_PROBE_DEPTH];
105
105
  ink_hrtime start_time;
106
106
  ClusterMachine *from;
 
107
  ClusterHandler *ch;
107
108
  VConnection *cache_vc;
108
109
  bool cache_read;
109
110
  int result;                   // return event code
214
215
    if (rw_buf_msg_len <= DEFAULT_MAX_BUFFER_SIZE) {
215
216
      rw_buf_msg = new_IOBufferData(buffer_size_to_index(rw_buf_msg_len, MAX_BUFFER_SIZE_INDEX));
216
217
    } else {
217
 
      rw_buf_msg = new_xmalloc_IOBufferData(xmalloc(rw_buf_msg_len), rw_buf_msg_len);
 
218
      rw_buf_msg = new_xmalloc_IOBufferData(ats_malloc(rw_buf_msg_len), rw_buf_msg_len);
218
219
    }
219
220
  }
220
221
 
427
428
  {
428
429
    if (NeedByteSwap()) {
429
430
      ink_release_assert(!"No byte swap for INK_MD5");
430
 
      swap32(&seq_number);
431
 
      swap32(&frag_type);
 
431
      ats_swap32(&seq_number);
 
432
      ats_swap32(&frag_type);
432
433
    }
433
434
  }
434
435
  //////////////////////////////////////////////////////////////////////////
479
480
  {
480
481
    if (NeedByteSwap()) {
481
482
      ink_release_assert(!"No byte swap for INK_MD5");
482
 
      swap16(&cfl_flags);
483
 
      swap32(&seq_number);
484
 
      swap32(&nbytes);
485
 
      swap32(&data);
486
 
      swap32((uint32_t *) & channel);
 
483
      ats_swap16(&cfl_flags);
 
484
      ats_swap32(&seq_number);
 
485
      ats_swap32(&nbytes);
 
486
      ats_swap32(&data);
 
487
      ats_swap32((uint32_t *) & channel);
487
488
      token.SwapBytes();
488
 
      swap32((uint32_t *) & buffer_size);
489
 
      swap32((uint32_t *) & frag_type);
 
489
      ats_swap32((uint32_t *) & buffer_size);
 
490
      ats_swap32((uint32_t *) & frag_type);
490
491
    }
491
492
  }
492
493
  //////////////////////////////////////////////////////////////////////////
538
539
  {
539
540
    if (NeedByteSwap()) {
540
541
      ink_release_assert(!"No byte swap for INK_MD5");
541
 
      swap16(&cfl_flags);
542
 
      swap32(&seq_number);
543
 
      swap32(&nbytes);
544
 
      swap32(&data);
 
542
      ats_swap16(&cfl_flags);
 
543
      ats_swap32(&seq_number);
 
544
      ats_swap32(&nbytes);
 
545
      ats_swap32(&data);
545
546
      if (opcode == CACHE_OPEN_READ) {
546
 
        swap32((uint32_t *) & buffer_size);
547
 
        swap32((uint32_t *) & channel);
 
547
        ats_swap32((uint32_t *) & buffer_size);
 
548
        ats_swap32((uint32_t *) & channel);
548
549
        token.SwapBytes();
549
550
      }
550
551
    }
591
592
    if (NeedByteSwap()) {
592
593
      ink_release_assert(!"No byte swap for MD5_1");
593
594
      ink_release_assert(!"No byte swap for MD5_2");
594
 
      swap16(&cfl_flags);
595
 
      swap32(&seq_number);
 
595
      ats_swap16(&cfl_flags);
 
596
      ats_swap32(&seq_number);
596
597
    }
597
598
  }
598
599
  //////////////////////////////////////////////////////////////////////////
633
634
  inline void SwapBytes()
634
635
  {
635
636
    if (NeedByteSwap()) {
636
 
      swap32(&seq_number);
637
 
      swap32((uint32_t *) & result);
 
637
      ats_swap32(&seq_number);
 
638
      ats_swap32((uint32_t *) & result);
638
639
      token.SwapBytes();
639
640
    }
640
641
  }