Index

Package: Alog.Protected_Containers

Description

package Alog.Protected_Containers is
Alog Protected Containers. This package provides protected containers which are safe for concurrent access.

Tasks & Protected

Log_Request_List (protected type)

References:

alog-protected_containers.ads:41:19 (declaration)
alog-active_logger.ads:164:44 (reference)
alog-protected_containers.adb:37:19 (body)
alog-protected_containers.adb:102:8 (label)
alog-protected_containers.ads:73:8 (label)
Protected variant of a log request list. This list holds log request objects and is safe for concurrent access. It operates in FIFO-Mode.

Protected_Exception_Map (protected type)

References:

alog-protected_containers.ads:83:19 (declaration)
alog-protected_containers.adb:106:19 (body)
alog-protected_containers.adb:169:8 (label)
alog-protected_containers.ads:116:8 (label)
alog-tasked_logger.adb:51:52 (reference)
Protected map of exceptions. To make memory management more robust only copies of Excpetion_Occurrences and not handles are returned by the map. The memory of an occurrence pointed to by a previously inserted handle is freed upon calling Delete, Clear or during finalization of the protected type.

Types

Log_Request_Storage

type Log_Request_Storage is private;

Exception_Storage

type Exception_Storage is limited private;

Subprograms & Entries

Log_Request_List. Put

procedure Put 
(Element: Log_Request.Instance);

References:

alog-active_logger.adb:185:34 (reference)
alog-protected_containers.adb:96:17 (body)
alog-protected_containers.adb:100:11 (label)
Put an element at the end of the request list.

Log_Request_List. Get (abstract)

entry Get 
(Element: out Log_Request.Instance);

References:

alog-active_logger.adb:263:37 (reference)
alog-protected_containers.adb:68:13 (body)
alog-protected_containers.adb:78:11 (label)

Called by:

Alog.Active_Logger.Logging_Task defined at alog-active_logger.ads:149:14
Get the first element from the list (and delete it).

Log_Request_List. Done

procedure Done;

References:

alog-active_logger.adb:272:37 (reference)
alog-protected_containers.adb:58:17 (body)
alog-protected_containers.adb:64:11 (label)

Called by:

Alog.Active_Logger.Logging_Task defined at alog-active_logger.ads:149:14
Signal successfull processing of request previously gotten from list.

Log_Request_List. All_Done (abstract)

entry All_Done;

References:

alog-active_logger.adb:35:28 (reference)
alog-active_logger.adb:201:31 (reference)
alog-protected_containers.adb:41:13 (body)
alog-protected_containers.adb:46:11 (label)
This procedure blocks until the list is empty and there are no pending requests. A requests is pending when it is taken off the list via Get but it's successfull processing has not been signaled back via the procedure Done.

Log_Request_List. Clear

procedure Clear;

References:

alog-protected_containers.adb:50:17 (body)
alog-protected_containers.adb:54:11 (label)
Clear the request list by deleting all log requests.

Log_Request_List. Length

function Length return Natural;

References:

alog-active_logger.adb:142:35 (reference)
alog-protected_containers.adb:82:16 (body)
alog-protected_containers.adb:85:11 (label)
Return the number of elements in the list.

Log_Request_List. Pending

function Pending return Natural;

References:

alog-protected_containers.adb:89:16 (body)
alog-protected_containers.adb:92:11 (label)
Return the number of pending requests.

Protected_Exception_Map. Insert

procedure Insert        
(Key: Ada.Task_Identification.Task_Id;
Item: Ada.Exceptions.Exception_Occurrence_Access);

References:

alog-protected_containers.adb:153:17 (body)
alog-protected_containers.adb:160:11 (label)
alog-tasked_logger.adb:116:33 (reference)
alog-tasked_logger.adb:138:33 (reference)
alog-tasked_logger.adb:231:33 (reference)
Insert the given Exception_Occurrence 'Element' with key 'Key' into the map.

Protected_Exception_Map. Get

procedure Get        
(Key: Ada.Task_Identification.Task_Id;
Element: out Ada.Exceptions.Exception_Occurrence);

References:

alog-protected_containers.adb:135:17 (body)
alog-protected_containers.adb:149:11 (label)
alog-tasked_logger.adb:191:30 (reference)
Get the Exception_Occurrence with key 'Key' from the map. If the key is not found in the map Null_Occurrence is stored in element.

Protected_Exception_Map. Delete

procedure Delete 
(Key: Ada.Task_Identification.Task_Id);

References:

alog-protected_containers.adb:128:17 (body)
alog-protected_containers.adb:131:11 (label)
alog-tasked_logger.adb:107:30 (reference)
alog-tasked_logger.adb:130:30 (reference)
alog-tasked_logger.adb:220:30 (reference)
Delete the Exception_Occurrence with key 'Key' from the map. Memory of the exception occurrence is freed. The user must make sure to not access deleted elements.

Protected_Exception_Map. Contains

function Contains 
(Key: Ada.Task_Identification.Task_Id)
return Boolean;

References:

alog-protected_containers.adb:118:16 (body)
alog-protected_containers.adb:124:11 (label)
alog-protected_containers.adb:140:13 (reference)
alog-tasked_logger.adb:106:30 (reference)
alog-tasked_logger.adb:129:30 (reference)
alog-tasked_logger.adb:219:30 (reference)
Returns True if an element with key 'Key' is in the map.

Protected_Exception_Map. Is_Empty

function Is_Empty return Boolean;

References:

alog-protected_containers.adb:164:16 (body)
alog-protected_containers.adb:167:11 (label)
Return True if the map is empty.

Protected_Exception_Map. Clear

procedure Clear;

References:

alog-protected_containers.adb:110:17 (body)
alog-protected_containers.adb:114:11 (label)
alog-tasked_logger.adb:170:30 (reference)
Remove all Exception_Occurrences in the map. Memory of the exception occurrences is freed.