#At file:///home/jonas/src/telco-6.4/
3064 Jonas Oreland 2008-11-10
ndb - try to make sun studio happy
modified:
storage/ndb/include/transporter/TransporterRegistry.hpp
storage/ndb/src/common/transporter/TransporterRegistry.cpp
storage/ndb/src/kernel/vm/mt.cpp
=== modified file 'storage/ndb/include/transporter/TransporterRegistry.hpp'
--- a/storage/ndb/include/transporter/TransporterRegistry.hpp 2008-11-06 10:17:49 +0000
+++ b/storage/ndb/include/transporter/TransporterRegistry.hpp 2008-11-10 09:28:28 +0000
@@ -462,7 +462,7 @@ private:
Uint16 m_start;
/* Data; real size is to the end of one page. */
- unsigned char m_data[2];
+ char m_data[2];
};
/* Send buffer for one transporter. */
=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2008-11-07 08:52:22 +0000
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2008-11-10 09:28:28 +0000
@@ -1916,7 +1916,7 @@ TransporterRegistry::get_bytes_to_send_i
SendBufferPage *page = b->m_first_page;
while (page != NULL && count < max)
{
- dst[count].iov_base = (char*)page->m_data+page->m_start;
+ dst[count].iov_base = page->m_data+page->m_start;
dst[count].iov_len = page->m_bytes;
assert(page->m_start + page->m_bytes <= page->max_data_bytes());
page = page->m_next;
=== modified file 'storage/ndb/src/kernel/vm/mt.cpp'
--- a/storage/ndb/src/kernel/vm/mt.cpp 2008-11-09 13:07:30 +0000
+++ b/storage/ndb/src/kernel/vm/mt.cpp 2008-11-10 09:28:28 +0000
@@ -602,6 +602,12 @@ struct thr_tq
struct thr_send_page
{
static const Uint32 PGSIZE = 32768;
+#ifdef SIZEOF_CHARP == 4
+ static const Uint32 HEADER_SIZE = 8;
+#else
+ static const Uint32 HEADER_SIZE = 12;
+#endif
+
static Uint32 max_bytes() {
return PGSIZE - offsetof(thr_send_page, m_data);
}
@@ -616,7 +622,7 @@ struct thr_send_page
Uint16 m_start;
/* Data; real size is to the end of one page. */
- unsigned char m_data[2];
+ char m_data[2];
};
/**
@@ -1408,7 +1414,7 @@ link_thread_send_buffers(thr_repository:
wi[thr] = src[thr].m_write_index;
}
- Uint32 sentinel[thr_send_page::PGSIZE - thr_send_page::max_bytes()];
+ Uint32 sentinel[thr_send_page::HEADER_SIZE];
thr_send_page* sentinel_page = (thr_send_page*)sentinel;
sentinel_page->m_next = 0;
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (jonas:3064) | Jonas Oreland | 10 Nov |