OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [librtems++/] [include/] [rtems++/] [rtemsStatusCode.h] - Rev 219

Go to most recent revision | Compare with Previous | Blame | View Log

/*
  ------------------------------------------------------------------------
  $Id: rtemsStatusCode.h,v 1.2 2001-09-27 12:02:05 chris Exp $
  ------------------------------------------------------------------------
 
  COPYRIGHT (c) 1997
  Objective Design Systems Ltd Pty (ODS)
  All rights reserved (R) Objective Design Systems Ltd Pty
 
  The license and distribution terms for this file may be found in the
  file LICENSE in this distribution or at
  http://www.OARcorp.com/rtems/license.html.
 
  ------------------------------------------------------------------------
 
  rtemsStatusCode controls and manages status codes from the RTEMS kernel.
 
  ------------------------------------------------------------------------
*/
 
#if !defined(_rtemsStatusCode_h_)
#define _rtemsStatusCode_h_
 
#include <rtems.h>
 
/* ----
    rtemsStatusCode
*/
 
class rtemsStatusCode
{
public:
 
  rtemsStatusCode() { last_status = RTEMS_NOT_CONFIGURED; }
 
  const bool successful() { return last_status == RTEMS_SUCCESSFUL; }
  const bool unsuccessful() { return last_status != RTEMS_SUCCESSFUL; }
 
  // return the last status code
  const rtems_status_code last_status_code() { return last_status; }
 
  // return the last status as a string
  const char *last_status_string();
 
  const char *status_string(rtems_status_code status_code);
 
protected:
  const rtems_status_code set_status_code(const rtems_status_code status)
  { return (last_status = status); }
 
private:
 
  // public at the moment, this might change
  rtems_status_code last_status;
};
 
#endif  // _rtemsStatusCode_h_
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.