Section C (New)

LRM-115

Change (changes in red and blue):

Annex C

Std Package

(Informative)

The standard package contains system types (see Section 7.10.1). The following types are provided by the std build-in package. The descriptions of the semantics of these types are defined in the indicated sections.

 

C.1 Semaphore

The semaphore class is described in Section 13.2 and its prototype is:

 

class semaphore;

function new(int keyCount = 0 );

task put(int keyCount = 1);

task get(int keyCount = 1);

function int try_get(int keyCount = 1);

endclass

 

C.2 Mailbox

The mailbox class is described in Section 13.3 and its prototype is:

 

Note: dynamic_singular_type below represents a special type that enables run-time type-checking.

 

class mailbox #(type T = dynamic_singular_type) ;     

function new(int bound = 0);

function int num();

task put( T message);

function int try_put( T message);

task get( ref T message );

function int try_get( ref T message );

task peek( ref T message );

function int try_peek( ref T message );

endclass

 

C.3 Randomize

The randomize function is described in Section 12.11 and its prototype is:

 

function int randomize( ... );

 

The syntax for the randomize function is:

 

randomize( variable_identifier {, variable_identifier } ) [ with constraint_block ];

 

C.4 Process

The process class is described in Section 9.9 and its prototype is:

 

class process;

enum state { FINISHED, RUNNING, WAITING, SUSPENDED, KILLED };

 

static function process self();

function state status();

task kill();

task await();

task suspend();

task resume();

endclass