Harlequin RIP SDK
swoften.h File Reference

This file contains definitions necessary to incorporate SwOften macros in OEM code. More...

#include "ripcall.h"

Macros

#define SwOften()   (SwOftenActivateUnsafe())
 Poll for interrupts. More...
 
#define SkinOftenSafe()   (SwOftenActivateSafe())
 Poll for interrupts and run PostScript asynchronous actions in a context where it is safe to run asynchronous actions. More...
 
#define SkinOftenUnsafe()   (SwOftenActivateUnsafe())
 Poll for interrupts in a context where it is not safe to run PostScript asynchronous actions. More...
 

Functions

int32 SwOftenActivateSafe (void)
 Poll for interrupts and run PostScript asynchronous actions in a context where it is safe to run PostScript asynchronous actions. More...
 
int32 SwOftenActivateUnsafe (void)
 Poll for interrupts in a context where it is not safe to run PostScript asynchronous actions. More...
 
int32 SwOftenCore (void)
 Poll for interrupts in a context where it is not safe to run PostScript asynchronous actions. More...
 

Detailed Description

This file contains definitions necessary to incorporate SwOften macros in OEM code.

SwOften() must be called frequently in routines which are likely to take some time to complete: for example, if a large write is being done, it should be broken down into smaller chunks, with a call to SwOften() each time round the loop.

There are two versions of which only one will be compiled: for systems with and without a real time clock interrupt of some sort.

Note that if SwOften() returns a negative number, the caller must tidy up and return immediately since an interrupt has been requested.

Copyright (C) 2023 Global Graphics Software Ltd. All rights reserved. Global Graphics Software Ltd. Confidential Information.

Macro Definition Documentation

◆ SkinOftenSafe

#define SkinOftenSafe ( )    (SwOftenActivateSafe())

Poll for interrupts and run PostScript asynchronous actions in a context where it is safe to run asynchronous actions.

Deprecated:
Returns
A negative value indicates an interrupt. The caller should stop any work it is doing, and return a failure indication.
Note
Never use this macro, unless you understand the restrictions on asynchronous PostScript.

◆ SkinOftenUnsafe

#define SkinOftenUnsafe ( )    (SwOftenActivateUnsafe())

Poll for interrupts in a context where it is not safe to run PostScript asynchronous actions.

Deprecated:
Returns
A negative value indicates an interrupt. The caller should stop any work it is doing, and return a failure indication.

◆ SwOften

#define SwOften ( )    (SwOftenActivateUnsafe())

Poll for interrupts.

Returns
A negative value indicates an interrupt. The caller should stop any work it is doing, and return a failure indication.

Function Documentation

◆ SwOftenActivateSafe()

int32 SwOftenActivateSafe ( void  )

Poll for interrupts and run PostScript asynchronous actions in a context where it is safe to run PostScript asynchronous actions.

Note
Never use this function, unless you understand the restrictions on asynchronous PostScript.
Returns
A negative value indicates an interrupt. The caller should stop any work it is doing, and return a failure indication.

◆ SwOftenActivateUnsafe()

int32 SwOftenActivateUnsafe ( void  )

Poll for interrupts in a context where it is not safe to run PostScript asynchronous actions.

Returns
A negative value indicates an interrupt. The caller should stop any work it is doing, and return a failure indication.

◆ SwOftenCore()

int32 SwOftenCore ( void  )

Poll for interrupts in a context where it is not safe to run PostScript asynchronous actions.

Deprecated:

Identical to SwOftenActivateUnsafe().

Returns
A negative value indicates an interrupt. The caller should stop any work it is doing, and return a failure indication.