IOmeter — решение «проблемы 2 ГГц»

Листинг

IOCQAIO.cpp
   {
   Transaction *transaction = NULL;
   - ULONG_PTR temp;
   + unsigned long temp;
   BOOL result;
   DWORD error_no;
   
   IOCommon.h
   char names[2][MAX_NETWORK_NAME];
   unsigned short port_number; // used only with TCP/IP.
   int processors;
   - int processor_speed;
   + double processor_speed;
   };
   
   IOManager.cpp
   }
   strcpy( data_msg.data.manager_info.names[1], prt->network_name );
   data_msg.data.manager_info.port_number = prt->network_port;
   - data_msg.data.manager_info.processor_speed = (int) perf_data[WHOLE_TEST_PERF].processor_speed;
   + data_msg.data.manager_info.processor_speed = perf_data[WHOLE_TEST_PERF].processor_speed;
   data_msg.data.manager_info.processors = perf_data[WHOLE_TEST_PERF].processor_count;
   
   IOPerformance.cpp
   {
   speed = speed_values[i];
   cout << “Processor speed: “ << speed << “ MHz.” << endl;
   - return (double) (speed * 1000000);
   + return speed * 1000000.0;
   }
   }
   // Round the registry value to the nearest 10
   speed = ( ( speed + 5 ) / 10 ) * 10;
   cout << “Processor speed: “ << speed << “ MHz.” << endl;
   - return (double) (speed * 1000000);
   + return speed * 1000000.0;
   }
   
   Pulsar.cpp
   {
   // it succeeded. We leave out atleast 25 file descriptors for non-targets
   // and compare with the hard limit.
   - int targets = MAX_TARGETS + 25;
   + unsigned int targets = MAX_TARGETS + 25;
   if ( rlimitp.rlim_max < targets )
   {
   cout << “Only “ << rlimitp.rlim_max << “ file descriptors    available” << endl; 
(вышеприведенные данные получены из материалов форума сайта sourceforge.net)
Pulsar.rc
   #define APSTUDIO_READONLY_SYMBOLS
   + #define _PULSAR_
Galileo.rc
   #define APSTUDIO_READONLY_SYMBOLS
   + #define _GALILEO_
Network.cpp
   #include “Network.h”
   + #include “GalileoDefs.h”
AccessDialog.cpp
   строка 945
   - m_LAccess.InsertItem( LVIF_IMAGE | LVIF_STATE | LVIF_PARAM,
   item_being_changed, NULL, LVIS_SELECTED | LVIS_FOCUSED, 
   LVIS_SELECTED | LVIS_FOCUSED, 1, (LONG_PTR) access_spec )
   + m_LAccess.InsertItem( LVIF_IMAGE | LVIF_STATE | LVIF_PARAM,
   item_being_changed, NULL, LVIS_SELECTED | LVIS_FOCUSED, 
   LVIS_SELECTED | LVIS_FOCUSED, 1, (LPARAM) access_spec )
PageAccess.cpp
   строка 179
   - m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   i, 
   spec->name,
   NULL, LVIS_SELECTED,
   spec->default_assignment,
   (LONG_PTR)spec );
   + m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   i, 
   spec->name,
   NULL, LVIS_SELECTED,
   spec->default_assignment,
   (LPARAM)spec );
   строка 211
   - m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   theApp.access_spec_list.IndexByRef( spec ), spec->name,
   LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED,
   AssignNone, (LONG_PTR)spec );
   + m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   theApp.access_spec_list.IndexByRef( spec ), spec->name,
   LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED,
   AssignNone, (LPARAM)spec );
   строка 544
   - m_LAssignedAccess.InsertItem( LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   s, spec->name, NULL, LVIS_SELECTED, BLUE, 
   (LONG_PTR)spec );
   + m_LAssignedAccess.InsertItem( LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   s, spec->name, NULL, LVIS_SELECTED, BLUE, 
   (LPARAM)spec );
   строка 1154
   - m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   m_LGlobalAccess.GetItemCount(), spec->name,
   LVIS_SELECTED, LVIS_SELECTED, AssignNone, (LONG_PTR)spec ); 
   + m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   m_LGlobalAccess.GetItemCount(), spec->name,
   LVIS_SELECTED, LVIS_SELECTED, AssignNone, (LPARAM)spec ); 
PageNetwork.cpp
   строка 361
   - if ( m_TTargets.GetItemData( hmgr ) == (DWORD_PTR)manager )
   + if ( m_TTargets.GetItemData( hmgr ) == (DWORD)manager )
   строка 446
   - if ( m_TTargets.GetItemData( hmgr ) == (DWORD_PTR)partner_manager )
   + if ( m_TTargets.GetItemData( hmgr ) == (DWORD)partner_manager )
WorkerView.cpp
   строка 112
   - while ( m_TWorkers.GetItemData(hmanager) != (DWORD_PTR)manager )
   hmanager = m_TWorkers.GetNextItem( hmanager, TVGN_NEXT );
   + while ( m_TWorkers.GetItemData(hmanager) != (DWORD)manager )
   hmanager = m_TWorkers.GetNextItem( hmanager, TVGN_NEXT );
   строка 131
   - while ( m_TWorkers.GetItemData( hworker ) != (DWORD_PTR) worker )
   hworker = m_TWorkers.GetNextSiblingItem( hworker );
   + while ( m_TWorkers.GetItemData( hworker ) != (DWORD) worker )
   hworker = m_TWorkers.GetNextSiblingItem( hworker );
   строка 205
   - m_TWorkers.SetItemData( hmanager, (DWORD_PTR) manager );
   + m_TWorkers.SetItemData( hmanager, (DWORD) manager );
   строка 240
   - m_TWorkers.SetItemData( hworker, (DWORD_PTR) worker );
   + m_TWorkers.SetItemData( hworker, (DWORD) worker );
   IOCQAIO.cpp
   {
   Transaction *transaction = NULL;
   - ULONG_PTR temp;
   + unsigned long temp;
   BOOL result;
   DWORD error_no;
   
   IOCommon.h
   char names[2][MAX_NETWORK_NAME];
   unsigned short port_number; // used only with TCP/IP.
   int processors;
   - int processor_speed;
   + double processor_speed;
   };
   
   IOManager.cpp
   }
   strcpy( data_msg.data.manager_info.names[1], prt->network_name );
   data_msg.data.manager_info.port_number = prt->network_port;
   - data_msg.data.manager_info.processor_speed = (int) perf_data[WHOLE_TEST_PERF].processor_speed;
   + data_msg.data.manager_info.processor_speed = perf_data[WHOLE_TEST_PERF].processor_speed;
   data_msg.data.manager_info.processors = perf_data[WHOLE_TEST_PERF].processor_count;
   
   IOPerformance.cpp
   {
   speed = speed_values[i];
   cout << “Processor speed: “ << speed << “ MHz.” << endl;
   - return (double) (speed * 1000000);
   + return speed * 1000000.0;
   }
   }
   // Round the registry value to the nearest 10
   speed = ( ( speed + 5 ) / 10 ) * 10;
   cout << “Processor speed: “ << speed << “ MHz.” << endl;
   - return (double) (speed * 1000000);
   + return speed * 1000000.0;
   }
   
   Pulsar.cpp
   {
   // it succeeded. We leave out atleast 25 file descriptors for non-targets
   // and compare with the hard limit.
   - int targets = MAX_TARGETS + 25;
   + unsigned int targets = MAX_TARGETS + 25;
   if ( rlimitp.rlim_max < targets )
   {
   cout << “Only “ << rlimitp.rlim_max << “ file descriptors    available” << endl; 
(вышеприведенные данные получены из материалов форума сайта sourceforge.net)
Pulsar.rc
   #define APSTUDIO_READONLY_SYMBOLS
   + #define _PULSAR_
Galileo.rc
   #define APSTUDIO_READONLY_SYMBOLS
   + #define _GALILEO_
Network.cpp
   #include “Network.h”
   + #include “GalileoDefs.h”
AccessDialog.cpp
   строка 945
   - m_LAccess.InsertItem( LVIF_IMAGE | LVIF_STATE | LVIF_PARAM,
   item_being_changed, NULL, LVIS_SELECTED | LVIS_FOCUSED, 
   LVIS_SELECTED | LVIS_FOCUSED, 1, (LONG_PTR) access_spec )
   + m_LAccess.InsertItem( LVIF_IMAGE | LVIF_STATE | LVIF_PARAM,
   item_being_changed, NULL, LVIS_SELECTED | LVIS_FOCUSED, 
   LVIS_SELECTED | LVIS_FOCUSED, 1, (LPARAM) access_spec )
PageAccess.cpp
   строка 179
   - m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   i, 
   spec->name,
   NULL, LVIS_SELECTED,
   spec->default_assignment,
   (LONG_PTR)spec );
   + m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   i, 
   spec->name,
   NULL, LVIS_SELECTED,
   spec->default_assignment,
   (LPARAM)spec );
   строка 211
   - m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   theApp.access_spec_list.IndexByRef( spec ), spec->name,
   LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED,
   AssignNone, (LONG_PTR)spec );
   + m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   theApp.access_spec_list.IndexByRef( spec ), spec->name,
   LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED,
   AssignNone, (LPARAM)spec );
   строка 544
   - m_LAssignedAccess.InsertItem( LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   s, spec->name, NULL, LVIS_SELECTED, BLUE, 
   (LONG_PTR)spec );
   + m_LAssignedAccess.InsertItem( LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   s, spec->name, NULL, LVIS_SELECTED, BLUE, 
   (LPARAM)spec );
   строка 1154
   - m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   m_LGlobalAccess.GetItemCount(), spec->name,
   LVIS_SELECTED, LVIS_SELECTED, AssignNone, (LONG_PTR)spec ); 
   + m_LGlobalAccess.InsertItem( LVIF_STATE | LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE,
   m_LGlobalAccess.GetItemCount(), spec->name,
   LVIS_SELECTED, LVIS_SELECTED, AssignNone, (LPARAM)spec ); 
PageNetwork.cpp
   строка 361
   - if ( m_TTargets.GetItemData( hmgr ) == (DWORD_PTR)manager )
   + if ( m_TTargets.GetItemData( hmgr ) == (DWORD)manager )
   строка 446
   - if ( m_TTargets.GetItemData( hmgr ) == (DWORD_PTR)partner_manager )
   + if ( m_TTargets.GetItemData( hmgr ) == (DWORD)partner_manager )
WorkerView.cpp
   строка 112
   - while ( m_TWorkers.GetItemData(hmanager) != (DWORD_PTR)manager )
   hmanager = m_TWorkers.GetNextItem( hmanager, TVGN_NEXT );
   + while ( m_TWorkers.GetItemData(hmanager) != (DWORD)manager )
   hmanager = m_TWorkers.GetNextItem( hmanager, TVGN_NEXT );
   строка 131
   - while ( m_TWorkers.GetItemData( hworker ) != (DWORD_PTR) worker )
   hworker = m_TWorkers.GetNextSiblingItem( hworker );
   + while ( m_TWorkers.GetItemData( hworker ) != (DWORD) worker )
   hworker = m_TWorkers.GetNextSiblingItem( hworker );
   строка 205
   - m_TWorkers.SetItemData( hmanager, (DWORD_PTR) manager );
   + m_TWorkers.SetItemData( hmanager, (DWORD) manager );
   строка 240
   - m_TWorkers.SetItemData( hworker, (DWORD_PTR) worker );
   + m_TWorkers.SetItemData( hworker, (DWORD) worker );
 

возврат


Наш канал на Youtube

1999 1 2 3 4 5 6 7 8 9 10 11 12
2000 1 2 3 4 5 6 7 8 9 10 11 12
2001 1 2 3 4 5 6 7 8 9 10 11 12
2002 1 2 3 4 5 6 7 8 9 10 11 12
2003 1 2 3 4 5 6 7 8 9 10 11 12
2004 1 2 3 4 5 6 7 8 9 10 11 12
2005 1 2 3 4 5 6 7 8 9 10 11 12
2006 1 2 3 4 5 6 7 8 9 10 11 12
2007 1 2 3 4 5 6 7 8 9 10 11 12
2008 1 2 3 4 5 6 7 8 9 10 11 12
2009 1 2 3 4 5 6 7 8 9 10 11 12
2010 1 2 3 4 5 6 7 8 9 10 11 12
2011 1 2 3 4 5 6 7 8 9 10 11 12
2012 1 2 3 4 5 6 7 8 9 10 11 12
2013 1 2 3 4 5 6 7 8 9 10 11 12
Популярные статьи
КомпьютерПресс использует