Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

Table of Contents

System Management

Exploring Palm OS®

About This Document

The Exploring Palm OS Series

Additional Resources

Changes to This Document

3110-002

3110-001

Part I: Concepts

1 Attentions and Alarms

Getting the User's Attention

The Role of the Attention Manager

Attention Manager Operation

Getting the User's Attention

Attentions and Alarms

Detecting and Updating Pending Attentions

Detecting Device Capabilities

Controlling the Attention Indicator

Alarms

Setting an Alarm

Alarm Scenario

Summary of Attentions and Alarms

2 Features

The Operating System Version Feature

Application-Defined Features

Using the Feature Manager

Feature Memory

Feature Memory Limitations

3 Preferences

Accessing System Preferences

Setting System Preferences

Setting Application-Specific Preferences

When to Use Application Preferences

How to Store Preferences

Which Preferences Database to Use

Updating Preferences Upon a New Release

4 Sound

Playing Simple Sounds

Sound Preferences

5 Expansion

Expansion Support

Primary vs. Secondary Storage

Expansion Slot

Universal Connector

Architectural Overview

Block Device Drivers

File Systems

VFS Manager

Expansion Manager

Applications on Cards

Card Insertion and Removal

Start.prc

Checking for Expansion Cards

Verifying Handheld Compatibility

Checking for Mounted Volumes

Enumerating Slots

Determining a Card's Capabilities

Summary of Expansion Manager

6 Shared Libraries

Exporting Globals

Patching Shared Libraries

Patch Configuration Database

Constructing a Patch

Registering the Patch

The Patch Call Chain

Adding and Removing Patches

Patch Security

The Program Loader

Program Loader Library Functions

Shared Libraries and the Program Loader

7 System Reset

Soft Reset

Safe-Mode Reset

Hard Reset

System Reset Calls

8 Threading

Architecture Overview

Threads and Scheduling

Processes and Applications

Thread Synchronization

Inter-Process Communication

Graphics Context

Using the Threading APIs

Application Launching

Launching in the Background Process

Manipulating Threads

Inter-Process Communication (IPC)

Atomic Operations

Synchronization

Thread-Specific Data

Accessing the User Interface from Outside the Main UI Thread

Summary of Threading

9 Power Management

Palm OS Power Modes

Guidelines for Application Developers

Power Management Calls

10 The ROM Serial Number

11 Time

Using Real-Time Clock Functions

Using System Ticks Functions

12 Floating Point

Summary of Float Manager

13 Debugging Strategies

Displaying Development Errors

Setting the Build Type

Displaying Error Messages

The Try-and-Catch Mechanism

Using the Try-and-Catch Mechanism

Summary of Debugging API

Part II: Reference

14 Alarm Manager

Alarm Manager Structures and Types

AlmProcCmdEnum

SysAlarmTriggeredParamType

SysDisplayAlarmParamType

Alarm Manager Constants

Alarm Manager Error Codes

AlmProcCmdEnumTag

Alarm Manager Launch Codes

sysAppLaunchCmdAlarmTriggered

sysAppLaunchCmdDisplayAlarm

Alarm Manager Functions and Macros

AlmEnableNotification

AlmGetAlarm

AlmSetAlarm

15 Attention Manager

Attention Manager Structures and Types

AttnCommandArgsDrawDetailTag

AttnCommandArgsDrawListTag

AttnCommandArgsGotItTag

AttnCommandArgsIterateTag

AttnCommandArgsType

AttnCommandType

AttnFlagsType

AttnLaunchCodeArgsType

AttnLevelType

AttnNotifyDetailsType

Attention Manager Constants

Attention Manager Error Codes

Drawing Constants

Feature Constants

Feature Masks

Feature Flags

Attention Flags

Attention Override Flags

Commands

Attention Levels

Attention Manager Launch Codes

sysAppLaunchCmdAttention

Attention Manager Functions and Macros

AttnDoSpecialEffects

AttnForgetIt

AttnForgetItV40

AttnGetAttention

AttnGetAttentionV40

AttnGetCounts

AttnGetCountsV40

AttnIndicatorEnable

AttnIndicatorEnabled

AttnIterate

AttnIterateV40

AttnListOpen

AttnUpdate

AttnUpdateV40

16 Category Manager Sync

Category Manager Sync Functions and Macros

CatMgrSyncGetModifiedCategories

CatMgrSyncGetPurgeCounter

CatMgrSyncReleaseStorage

17 Common Battery Types

Common Battery Types Structures and Types

SysBatteryKind

SysBatteryState

Common Battery Types Constants

SysBatteryKindTag

SysBatteryStateTag

18 Common Error Codes

Common Error Codes Constants

Error Code Classes

Binder Errors

DAL Errors

Media Manager Errors

System Errors

19 Cyclic Redundancy Check

CRC Functions and Macros

Crc16CalcBigBlock

Crc16CalcBlock

Crc32CalcBlock

20 DateTime

DateTime Structures and Types

DateFormatType

DateTimeType

DateType

DaylightSavingsTypes

DayOfMonthType

DayOfWeekType

TimeFormatType

TimeType

DateTime Constants

String Lengths

Months

Days

Conversions

Template Formatting Characters

Miscellaneous DateTime Constants

DateFormatTag

Template Value Types

DaylightSavingsTag

DayOfWeekTag

TimeFormatTag

DateTime Functions and Macros

DateAdjust

DateDaysToDate

DateSecondsToDate

DateTemplateToAscii

DateToAscii

DateToDays

DateToDOWDMFormat

DateToInt

DayOfMonth

DayOfWeek

DaysInMonth

TimAdjust

TimDateTimeToSeconds

TimeGetFormatSeparator

TimeGetFormatSuffix

TimeIs24HourFormat

TimeToAscii

TimeToInt

TimeZoneToAscii

TimeZoneToAsciiV50

TimSecondsToDateTime

TimTimeZoneToUTC

TimUTCToTimeZone

21 Debug Manager

Debug Manager Functions and Macros

DbgBreak

DbgBreakMessage

DbgBreakMessageIf

DbgFatalErrorInContext

DbgGetChar

DbgIsPresent

DbgLookupSymbol

DbgMessage

DbgOutputSync

DbgPrintf

DbgRestartMallocProfiling

DbgSetMallocProfiling

DbgUnmangleSymbol

DbgVPrintf

DbgWalkStack

22 Desktop Link Server

Desktop Link Server Structures and Types

DlkCallAppReplyParamType

DlkCtlEnum

Desktop Link Server Constants

Miscellaneous Desktop Link Server Constants

DlkCtlEnumTag

DlkSyncStateType

Desktop Link Server Functions and Macros

DlkControl

DlkGetSyncInfo

DlkSetLogEntry

23 Error Manager

ErrorManager Constants

ErrDlgResultType

Error Manager Functions and Macros

DbgOnlyFatalError

DbgOnlyFatalErrorIf

ErrAlert

ErrDisplay

ErrDisplayFileLineMsg

ErrFatalDisplay

ErrFatalDisplayIf

ErrFatalError

ErrFatalErrorIf

ErrFatalErrorInContext

ErrGetErrorMsg

ErrNonFatalDisplay

ErrNonFatalDisplayIf

24 ErrTryCatch

ErrTryCatch Structures and Types

ErrExceptionType

ErrJumpBuf

ErrTryCatch Functions and Macros

ErrCatch

ErrCatchWithAddress

ErrEndCatch

ErrExceptionListAppend

ErrExceptionListGetByThreadID

ErrExceptionListRemove

ErrLongJump

ErrSetJump

ErrThrow

ErrThrowIf

ErrThrowWithAddress

ErrThrowWithHandler

ErrTry

25 Expansion Manager

Expansion Manager Structures and Types

CardMetricsType

ExpCardInfoType

Expansion Manager Constants

Expansion Manager Error Codes

Defined Media Types

Capability Flags

Enumeration Constants

Partition Type Flags

Miscellaneous Expansion Manager Constants

Expansion Manager Functions and Macros

ExpCardInfo

ExpCardIsFilesystemSupported

ExpCardMediaType

ExpCardMetrics

ExpCardPresent

ExpCardSectorRead

ExpCardSectorWrite

ExpSlotCustomControl

ExpSlotEnumerate

ExpSlotMediaType

ExpSlotPowerCheck

26 Fatal Alert

Fatal Alert Constants

Fatal Alert Actions

Fatal Alert Functions and Macros

SysFatalAlert

SysFatalAlertInit

27 Feature Manager

Feature Manager Constants

Feature Manager Error Codes

Feature Manager Functions and Macros

FtrGet

FtrGetByIndex

FtrPtrFree

FtrPtrGet

FtrPtrNew

FtrPtrResize

FtrSet

FtrUnregister

28 Float Manager

Float Manager Constants

Float Manager Error Codes

Miscellaneous Float Manager Constants

Float Manager Functions and Macros

FlpAddDouble

FlpAddFloat

FlpBase10Info

FlpCompareDoubleEqual

FlpCompareDoubleLessThan

FlpCompareDoubleLessThanOrEqual

FlpCompareFloatEqual

FlpCompareFloatLessThan

FlpCompareFloatLessThanOrEqual

FlpCorrectedAdd

FlpCorrectedSub

FlpDivDouble

FlpDivFloat

FlpDoubleToFloat

FlpDoubleToInt32

FlpDoubleToLongDouble

FlpDoubleToLongLong

FlpDoubleToUInt32

FlpDoubleToULongLong

FlpFloatToDouble

FlpFloatToInt32

FlpFloatToLongDouble

FlpFloatToLongLong

FlpFloatToUInt32

FlpFloatToULongLong

FlpFToA

FlpGetExponent

FlpInt32ToDouble

FlpInt32ToFloat

FlpLongDoubleToDouble

FlpLongDoubleToFloat

FlpLongLongToDouble

FlpLongLongToFloat

FlpMulDouble

FlpMulFloat

FlpNegDouble

FlpNegFloat

FlpSubDouble

FlpSubFloat

FlpUInt32ToDouble

FlpUInt32ToFloat

FlpULongLongToDouble

FlpULongLongToFloat

29 Host Control

Host Control Structures and Types

HostBool

HostBoolType

HostClockType

HostControlSelectorType

HostControlTrapNumber

HostDirEntType

HostDIRType

HostErr

HostErrType

HostFILE

HostFILEType

HostID

HostIDType

HostPlatform

HostPlatformType

HostSignal

HostSignalType

HostSizeType

HostStatType

HostTimeType

HostTmType

HostUTimeType

Host Control Constants

Host Control Function Selectors

Host Control Error Codes

Host IDs

Host Platforms

Host Signals

File Attributes

Error Levels

Miscellaneous Host Control Constants

Host Control Functions and Macros

HostAscTime

HostClock

HostCloseDir

HostControl

HostCTime

HostEnteringApp

HostErrNo

HostExgLibAccept

HostExgLibClose

HostExgLibConnect

HostExgLibControl

HostExgLibDisconnect

HostExgLibGet

HostExgLibHandleEvent

HostExgLibOpen

HostExgLibPut

HostExgLibReceive

HostExgLibRequest

HostExgLibSend

HostExgLibSleep

HostExgLibWake

HostExitedApp

HostExportFile

HostFClose

HostFEOF

HostFError

HostFFlush

HostFGetC

HostFGetPos

HostFGetS

HostFOpen

HostFPrintF

HostFPutC

HostFPutS

HostFRead

HostFree

HostFReopen

HostFScanF

HostFSeek

HostFSetPos

HostFTell

HostFWrite

HostGestalt

HostGetChar

HostGetDirectory

HostGetEnv

HostGetFile

HostGetFileAttr

HostGetFirstApp

HostGetHostID

HostGetHostPlatform

HostGetHostVersion

HostGetPreference

HostGMTime

HostHostControl68K

HostImportFile

HostIsCallingTrap

HostIsSelectorImplemented

HostLocalTime

HostLogEvent

HostLogFile

HostMalloc

HostMkDir

HostMkTime

HostOpenDir

HostPrintF

HostProfileCleanup

HostProfileDetailFn

HostProfileDump

HostProfileInit

HostProfileStart

HostProfileStop

HostPutFile

HostReadDir

HostRealloc

HostRemove

HostRename

HostRmDir

HostSessionClose

HostSessionCreate

HostSessionOpen

HostSessionQuit

HostSetErrorLevel

HostSetFileAttr

HostSetLogFileSize

HostSetPreference

HostSignalResume

HostSignalSend

HostSignalWait

HostSlotHasCard

HostSlotMax

HostSlotRoot

HostStat

HostStrFTime

HostTime

HostTmpFile

HostTmpNam

HostTraceClose

HostTraceInit

HostTraceOutputB

HostTraceOutputT

HostTraceOutputTL

HostTraceOutputVT

HostTraceOutputVTL

HostTruncate

HostUTime

HostVFPrintF

HostVFScanF

HostVPrintF

30 Loader

Loader Structures and Types

SysModuleInfoType

SysPatchInfoType

Loader Constants

Miscellaneous Loader Constants

Loader Launch Codes

sysPatchLaunchCmdClearInfo

sysPatchLaunchCmdSetInfo

Loader Functions and Macros

SysGetEntryAddresses

SysGetModuleDatabase

SysGetModuleGlobals

SysGetModuleInfo

SysGetModuleInfoByDatabaseID

SysGetRefNum

SysLoadModule

SysLoadModuleByDatabaseID

SysRegisterPatch

SysUnloadModule

SysUnregisterPatch

Application-Defined Functions

SysMainEntryPtrType

31 Patch

Patch Structures and Types

SysPatchEntryNumType

SysPatchTargetHeaderType

Patch Constants

Patch Flags

Miscellaneous Patch Constants

32 PerfDriver

PerfDriver Structures and Types

PerfGenCPUClockInfoType

PerfRefNumType

PerfResultType

PerfDriver Constants

33 Preferences

Preferences Structures and Types

PrefActivePanelParamsType

Preferences Constants

MeasurementSystemType

SoundLevelTypeV20

SystemPreferencesChoice

Preferences Launch Codes

prefAppLaunchCmdSetActivePanel

Preferences Functions and Macros

PrefGetAppPreferences

PrefGetPreference

PrefSetAppPreferences

PrefSetPreference

34 Sync Manager

Sync Manager Constants

Sync Manager Error Codes

Sync Manager Security Policies

Miscellaneous Sync Manager Constants

Sync Manager Functions and Macros

SyncAddSynchronizer

SyncSessionGetAccess

SyncSessionReleaseAccess

35 System Manager

System Manager Constants

Power Manager Error Codes

System Features

Processor Types

Processor Masks

Build Stages

ROM Tokens

Device Manufacturers

Miscellaneous System Manager Constants

System Manager Functions and Macros

SysBatteryInfo

sysFtrNumProcessorIs68K

sysFtrNumProcessorIsARM

SysGetROMToken

sysGetROMVerBuild

sysGetROMVerFix

sysGetROMVerMajor

sysGetROMVerMinor

sysGetROMVerStage

SysHandleEvent

SysLCDBrightness

SysLCDContrast

sysMakeROMVersion

SysRequestSleep

SysSetAutoOffTime

SysSleep

SysTaskDelay

SysTicksPerSecond

SysTimeInCentiSecs

SysTimeInMicroSecs

SysTimeInMilliSecs

SysTimeInMins

SysTimeInSecs

SysTimeToMicroSecs

SysTimeToMilliSecs

SysTimeToSecs

SysTurnDeviceOn

SysUIBusy

36 SysThread

SysThread Structures and Types

SysConditionVariableType

SysCriticalSectionType

SysThreadExitCallbackID

SysThreadGroupHandle

SysThreadGroupTag

SysThreadGroupType

SysTSDSlotID

SysThread Constants

Thread Priorities

Miscellaneous System Thread Constants

Predefined TSD Slot Names

Predefined Semaphore Counts

timeoutFlags_t

SysThread Functions and Macros

SysAtomicAdd32

SysAtomicAnd32

SysAtomicCompareAndSwap32

SysAtomicOr32

SysConditionVariableBroadcast

SysConditionVariableClose

SysConditionVariableOpen

SysConditionVariableWait

SysCriticalSectionEnter

SysCriticalSectionExit

SysCurrentThread

SysGetRunTime

SysSemaphoreCreate

SysSemaphoreCreateEZ

SysSemaphoreDestroy

SysSemaphoreSignal

SysSemaphoreSignalCount

SysSemaphoreWait

SysSemaphoreWaitCount

SysThreadChangePriority

SysThreadCreate

SysThreadCreateEZ

SysThreadDelay

SysThreadExit

SysThreadGroupCreate

SysThreadGroupDestroy

SysThreadGroupWait

SysThreadInstallExitCallback

SysThreadRemoveExitCallback

SysThreadResume

SysThreadStart

SysThreadSuspend

SysTSDAllocate

SysTSDFree

SysTSDGet

SysTSDSet

Application-Defined Functions

SysThreadEnterFunc

SysThreadExitCallbackFunc

SysTSDDestructorFunc

37 System Utilities

System Utilities Structures and Types

CmpFuncPtr

SearchFuncPtr

SysBatteryKind

SysDBListItemType

System Utilities Constants

Miscellaneous System Utilities Constants

System Utilities Functions and Macros

Abs

SysAreWeRunningUI

SysAreWeUIThread

SysBatteryInfoV40

SysBinarySearch

SysCopyStringResource

SysCopyStringResourceV50

SysCreateDataBaseList

SysCreateDataBaseListV50

SysCreatePanelList

SysErrString

SysErrStringTextOnly

SysFormPointerArrayToStrings

SysGetOSVersionString

SysGetROMTokenV40

SysInsertionSort

SysQSort

SysRandom

SysStringByIndex

SysStringByIndexV50

38 Time Manager

Time Manager Constants

Time Manager Error Codes

Time Manager Functions and Macros

TimGetSeconds

TimGetTicks

TimInit

TimSetSeconds

39 Trace Manager

Trace Manager Functions and Macros

TM

TmOutputB

TmOutputT

TmOutputTL

TmOutputVT

TmOutputVTL

TraceDefine

TraceOutput