ACE TAO RTEMS build results

Jack Cawkwell J.Cawkwell at open.ac.uk
Tue Mar 25 16:50:37 UTC 2003


Hi,

These are the hacks I made to ACE to make it compile.

Affected files:

ACE_Wrappers/ace/Signal.cpp
ACE_Wrappers/ace/Signal.i
ACE_Wrappers/ace/config-rtems.h

file: ACE_Wrappers/ace/Signal.cpp
...
ACE_Sig_Action::ACE_Sig_Action (ACE_SignalHandler sig_handler,
                                sigset_t *sig_mask,
                                int sig_flags)
{
  // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
  this->sa_.sa_flags = sig_flags;

  if (sig_mask == 0)
    ACE_OS::sigemptyset (&this->sa_.sa_mask);
  else
    this->sa_.sa_mask = *sig_mask; // Structure assignment...

#if defined(RTEMS_HACK)
  this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
#else
#if !defined(ACE_HAS_TANDEM_SIGNALS)
  this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
#else
  this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
#endif /* !ACE_HAS_TANDEM_SIGNALS */
#endif
}

several similar to this follow, then ..

int
ACE_Sig_Handler::remove_handler (int signum,
                                 ACE_Sig_Action *new_disp,
                                 ACE_Sig_Action *old_disp,
                                 int)
{
  ACE_TRACE ("ACE_Sig_Handler::remove_handler");
  ACE_MT (ACE_Recursive_Thread_Mutex *lock =
    ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
      (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
    ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));

  if (ACE_Sig_Handler::in_range (signum))
    {
#if defined(RTEMS_HACK)
      ACE_Sig_Action sa ((void (*)(int))SIG_DFL, (sigset_t *) 0); //
Define the default disposition.
#else
      ACE_Sig_Action sa (SIG_DFL, (sigset_t *) 0); // Define the default
disposition.
#endif

      if (new_disp == 0)
        new_disp = &sa;

      ACE_Sig_Handler::signal_handlers_[signum] = 0;

      // Register either the new disposition or restore the default.
      return new_disp->register_action (signum, old_disp);
    }
  else
    return -1;
}

and similarly in

int
ACE_Sig_Handlers::remove_handler (int signum,
                                  ACE_Sig_Action *new_disp,
                                  ACE_Sig_Action *old_disp,
                                  int sigkey)
{
...

#if defined(RTEMS_HACK)
          ACE_Sig_Action sa ((void (*)(int))SIG_DFL, (sigset_t *) 0);
#else
          ACE_Sig_Action sa (SIG_DFL, (sigset_t *) 0);
#endif
...


file: ACE_Wrappers/ace/Signal.i

ACE_INLINE void
ACE_Sig_Action::handler (ACE_SignalHandler handler)
{
  ACE_TRACE ("ACE_Sig_Action::handler");
#if defined(RTEMS_HACK)
  this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (handler);
#else
#if !defined(ACE_HAS_TANDEM_SIGNALS)
  this->sa_.sa_handler = ACE_SignalHandlerV (handler);
#else
  this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (handler);
#endif /* !ACE_HAS_TANDEM_SIGNALS */
#endif
}


file: ACE_Wrappers/ace/config-rtems.h

deleted :

#define ACE_LACKS_UALARM_PROTOTYPE

added:

#define ACE_PSOS_TM
#define RTEMS_HACK


As for testing I have found the file ACE_wrappers/tests/rtems_init.c
and managed to get it to compile. I had to comment out the last call
to 'exit (0);' which caused a compile/link problem. There is some
obvious setup stuff to do with network addresses, but I cannot see
how to execute a test with it?






More information about the users mailing list