Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# oscl_scheduler_ao.h

Go to the documentation of this file.

    00001
    00012 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED
    00013 #define OSCL_SCHEDULER_AO_H_INCLUDED
    00014
    00015 #ifndef OSCL_SCHEDULER_TYPES_H_INCLUDED
    00016 #include "oscl_scheduler_types.h"
    00017 #endif
    00018
    00019 #ifndef OSCL_SCHEDULER_AOBASE_H_INCLUDED
    00020 #include "oscl_scheduler_aobase.h"
    00021 #endif
    00022
    00023 #ifndef OSCL_MEM_H_INCLUDED
    00024 #include "oscl_mem.h"
    00025 #endif
    00026
    00033 class OsclActiveObject:
    00034         public HeapBase,
    00035         public PVActiveBase
    00036 {
    00037     public:
    00041         enum OsclActivePriority
    00042         {
    00047             EPriorityIdle = -100,
    00051             EPriorityLow = -20,
    00055             EPriorityNominal = 0,
    00060             EPriorityHigh = 10,
    00064             EPriorityHighest = 20,
    00065         };
    00066
    00072         OSCL_IMPORT_REF OsclActiveObject(int32 aPriority, const char name[]);
    00073
    00077         OSCL_IMPORT_REF virtual ~OsclActiveObject();
    00078
    00079
    00088         OSCL_IMPORT_REF void SetBusy();
    00089
    00094         OSCL_IMPORT_REF bool IsBusy() const;
    00095
    00101         OSCL_IMPORT_REF void PendForExec();
    00102
    00109         OSCL_IMPORT_REF void PendComplete(int32 aStatus);
    00110
    00114         OSCL_IMPORT_REF void AddToScheduler();
    00115
    00122         OSCL_IMPORT_REF void RemoveFromScheduler();
    00123
    00124
    00132         OSCL_IMPORT_REF void RunIfNotReady();
    00133
    00143         OSCL_IMPORT_REF void Cancel();
    00144
    00145
    00149         OSCL_IMPORT_REF int32 Priority() const;
    00150
    00154         OSCL_IMPORT_REF int32 Status()const;
    00155         OSCL_IMPORT_REF void SetStatus(int32);
    00156         OSCL_IMPORT_REF OsclAOStatus& StatusRef();
    00157
    00158     protected:
    00167         OSCL_IMPORT_REF virtual void DoCancel();
    00168
    00179         OSCL_IMPORT_REF virtual int32 RunError(int32 aError);
    00180
    00181 };
    00182
    00188 class OsclTimerObject: public HeapBase
    00189         , public PVActiveBase
    00190 {
    00191     public:
    00197         OSCL_IMPORT_REF OsclTimerObject(int32 aPriority, const char name[]);
    00198
    00202         OSCL_IMPORT_REF virtual ~OsclTimerObject();
    00203
    00207         OSCL_IMPORT_REF void AddToScheduler();
    00208
    00209
    00216         OSCL_IMPORT_REF void RemoveFromScheduler();
    00217
    00218
    00231         OSCL_IMPORT_REF void After(int32 aDelayMicrosec);
    00232
    00241         OSCL_IMPORT_REF void RunIfNotReady(uint32 aDelayMicrosec = 0);
    00242
    00250         OSCL_IMPORT_REF void SetBusy();
    00251
    00256         OSCL_IMPORT_REF bool IsBusy() const;
    00257
    00267         OSCL_IMPORT_REF void Cancel();
    00268
    00272         OSCL_IMPORT_REF int32 Priority() const;
    00276         OSCL_IMPORT_REF int32 Status()const;
    00277         OSCL_IMPORT_REF void SetStatus(int32);
    00278         OSCL_IMPORT_REF OsclAOStatus& StatusRef();
    00279
    00280     protected:
    00291         OSCL_IMPORT_REF virtual void DoCancel();
    00292
    00303         OSCL_IMPORT_REF virtual int32 RunError(int32 aError);
    00304 };
    00305
    00306
    00307 #endif
    00308