Changeset 3512

Show
Ignore:
Timestamp:
04/27/07 17:25:14 (6 years ago)
Author:
ttsou
Message:

some sync stuff

Location:
platform/logService
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • platform/logService/LogAdministrator_impl.cpp

    r3510 r3512  
    1414void LogAdministrator_impl::set_max_size(CORBA::ULongLong size) 
    1515{ 
    16     // Not true maximum 
    17     log_record_sequence->maximum(size); 
     16    // Needs defining  
     17    return;  
    1818} 
    1919 
  • platform/logService/LogConsumer_impl.cpp

    r3510 r3512  
    2323    // Return pointer is callers responsibilty to deallocate 
    2424    CosLwLog::LogRecordSequence* return_sequence; 
     25 
     26    // Good enough solution until log sequences get extrememly large 
     27    test_mutex->acquire(); 
    2528    return_sequence = new CosLwLog::LogRecordSequence(*log_record_sequence); 
     29    test_mutex->release(); 
     30 
    2631    return return_sequence; 
    2732 
     
    3237    CORBA::ULong& howMany, const CosLwLog::LogLevelSequence& valueList) 
    3338{ 
    34     CosLwLog::LogRecordSequence* return_sequence; 
    35     return_sequence = new CosLwLog::LogRecordSequence(*log_record_sequence); 
    36     return return_sequence; 
     39    return LogConsumer_impl::retrieve_records(currentId, howMany); 
    3740} 
    3841 
     
    4144    CORBA::ULong& howMany, const CosLwLog::StringSeq& valueList) 
    4245{ 
    43     CosLwLog::LogRecordSequence* return_sequence; 
    44     return_sequence = new CosLwLog::LogRecordSequence(*log_record_sequence); 
    45     return return_sequence; 
     46    return LogConsumer_impl::retrieve_records(currentId, howMany); 
    4647} 
    4748 
     
    5051    CORBA::ULong& howMany, const CosLwLog::StringSeq& valueList) 
    5152{ 
    52     CosLwLog::LogRecordSequence* return_sequence; 
    53     return_sequence = new CosLwLog::LogRecordSequence(*log_record_sequence); 
    54     return return_sequence; 
     53    return LogConsumer_impl::retrieve_records(currentId, howMany); 
    5554} 
    5655 
  • platform/logService/LogProducer_impl.cpp

    r3510 r3512  
    4646 
    4747    // Add entry to sequence 
     48    test_mutex->acquire(); 
    4849    int indx = log_record_sequence->length(); 
    4950    (*log_record_sequence)[indx] = newLogRecord; 
     51    test_mutex->release(); 
    5052} 
    5153 
  • platform/logService/LogStatus_impl.cpp

    r3510 r3512  
    11#include "LogStatus_impl.h" 
     2 
     3#include <iostream> 
    24 
    35LogStatus_impl::LogStatus_impl() 
    46{ 
    57    // Lock this stuff later 
     8 
     9    test_mutex = new omni_mutex(); 
     10 
    611    log_record_sequence = new CosLwLog::LogRecordSequence(1000); 
    712 
  • platform/logService/LogStatus_impl.h

    r3486 r3512  
    44{ 
    55 
     6private: 
     7 
    68protected: 
     9    omni_mutex *test_mutex; 
     10 
    711    CosLwLog::LogRecordSequence* log_record_sequence; 
    812    CosLwLog::OperationalState operational_state; 
     
    1014    CosLwLog::LogFullAction log_full_action; 
    1115    CosLwLog::AvailabilityStatus availability_status; 
    12  
    13 /* 
    14     CosLwLog::OperationalState operationalState(); 
    15     void operationalState(CosLwLog::OperationalState); 
    16  
    17     CosLwLog::AdministrativeState administrativeState(); 
    18     void administrativeState(CosLwLog::AdministrativeState); 
    19  
    20     CosLwLog::LogFullAction logFullAction(); 
    21     void logFullACtion(CosLwLog::LogFullAction); 
    22  
    23     CosLwLog::AvailabilityStatus ; 
    24     void availabilityStatus(CosLwLog::AvailabilityStatus); 
    25 */ 
    2616 
    2717public: