< Previous PageNext Page > Hide TOC

Deprecated Memory Management Utilities Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.0

WriteLocation

Changes the geographic location or time-zone information stored in extended parameter RAM. (Deprecated in Mac OS X v10.0. There is no replacement because you cannot set this information in Mac OS X.)

void WriteLocation (
   const MachineLocation *loc
);

Parameters
loc

The geographic location and time-zone information to write to the extended parameter RAM.

Discussion

The latitude and longitude are stored in the geographic location structure as Fract values, giving accuracy to within 1 foot. For example, a Fract value of 1.0 equals 90 degrees –1.0 equals –90 degrees and –2.0 equals –180 degrees.

Use the functions Long2Fix and Fix2Fract to convert longitude and latitude values to the Fixed data type and then to the Fract data type for storage.

Use the daylight savings time value signed byte value to specify the offset for the hour field—whether to add one hour, subtract one hour, or make no change at all.

The Greenwich mean time value is in seconds east of GMT. For example, San Francisco is at –28,800 seconds (8 hours * 3,600 seconds per hour) east of GMT.The gmtDelta field is a 3-byte value contained in a long word. When writing gmtDelta, mask off the top byte because it is reserved. Preserve the value of dlsDelta.

The WriteLocation function was previously available with the Script Manager.

For more information on the geographic location record, see MachineLocation.

For more information on the Fract data type and the conversion routines Long2Fix, Fix2Fract, Fract2Fix, and Fix2Long, see Mathematical and Logical Utilities.

Special Considerations

Do not call the WriteLocation function at interrupt time.

Availability
Declared In
OSUtils.h

Deprecated in Mac OS X v10.3

InitUtil

Copies the contents of parameter RAM into low memory. (Deprecated in Mac OS X v10.3. There is no replacement because Mac OS X doesn’t require this initialization.)

OSErr InitUtil (
   void
);

Return Value

A result code. See “Memory Management Utilities Result Codes.”

Availability
Declared In
OSUtils.h

Deprecated in Mac OS X v10.4

DTInstall

Adds the specified task record to the deferred-task queue. (Deprecated in Mac OS X v10.4. You should restructure your application to use threads, such as those supplied by Multiprocessing Services.)

OSErr DTInstall (
   DeferredTaskPtr dtTaskPtr
);

Parameters
dtTaskPtr
Return Value

A result code. See “Memory Management Utilities Result Codes.”

Availability
Declared In
OSUtils.h

DTUninstall

(Deprecated in Mac OS X v10.4. You should restructure your application to use threads, such as those supplied by Multiprocessing Services.)

OSErr DTUninstall (
   DeferredTaskPtr dtTaskPtr
);

Availability
Declared In
OSUtils.h

GetSysPPtr

Returns a pointer to the low-memory copy of parameter RAM. (Deprecated in Mac OS X v10.4. There is no replacement; this function always returns NULL in Mac OS X.)

SysPPtr GetSysPPtr (
   void
);

Return Value

See the description of the SysPPtr data type.

Availability
Declared In
OSUtils.h

SetA5

Sets the A5 register to the address specified. (Deprecated in Mac OS X v10.4. There is no replacement because Mac OS X doesn’t use the A5 variable.)

long SetA5 (
   long newA5
);

Parameters
newA5

The value to which the A5 register is to be changed.

Return Value

The value in the A5 register before SetA5 changes it to newA5.

Discussion

In interrupt code that accesses application global variables, use the SetA5 function first to restore a value previously saved using SetCurrentA5, and then, at the end of the code, to restore the A5 register to the value it had before the first call to SetA5.

Carbon Porting Notes

68K-specific. Does nothing in PowerPC native code.

Availability
Declared In
OSUtils.h

SetCurrentA5

Sets the value in register A5 to the value of the low-memory global variable CurrentA5. (Deprecated in Mac OS X v10.4. There is no replacement because Mac OS X doesn’t use the A5 variable.)

long SetCurrentA5 (
   void
);

Return Value

The value in the A5 register before SetCurrentA5 changes it to the value of the low-memory global variable CurrentA5.

Discussion

The CurrentA5 variable points to the boundary between the parameters and global variables of the current application.

You cannot reliably call SetCurrentA5 in code that executes at interrupt time unless you first guarantee that your application is the current process (for example, by calling the Process Manager function GetCurrentProcess). In general, you should call SetCurrentA5 at noninterrupt time and then pass the returned value to the interrupt code.

Carbon Porting Notes

68K-specific. Does nothing in PowerPC native code.

Availability
Declared In
OSUtils.h

WriteParam

Write the modified values in the system parameters data structure to parameter RAM. (Deprecated in Mac OS X v10.4. There is no replacement, because this function does nothing in Mac OS X.)

OSErr WriteParam (
   void
);

Return Value

A result code. See “Memory Management Utilities Result Codes.”

Availability
Declared In
OSUtils.h

< Previous PageNext Page > Hide TOC


© 2003, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-07-12)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.