pragma OS_TASK in AIX Ada/6000 Rel.2.0 
Author Message
 pragma OS_TASK in AIX Ada/6000 Rel.2.0

Hi, Ada guru

If you are using the AIX Ada/6000 compiler on IBM RS/6000
machines, have you tried 'pragma OS_TASK' facility ?

In order to avoid the blocking of a task when other task doing I/O,
I decided to use 'pragma OS_TASK', but I failed even with the
following simple program and I don't understand the error message.
Anyone can help me with this problem ?

--- Young-kuk Kim

******** The sample program ************

-- os_task.ada : a simple OS TASK test program
-- TO Compile & Link: ada -v -m os_task.ada -o os_task
-- TO Execute : os_task

with Text_IO; use Text_IO;

procedure TEST_OS_TASK is

  task A is
    pragma OS_TASK(0);
  end A;

  task B is
    pragma OS_TASK(0);
  end B;

  CHOICE : string(1..2);
  M : natural;

  task body A is
      Put_Line("TASK A executing ...");
    end loop;
  end A;

  task body B is
    S : string(1..50);
    DATA_FILE : File_Type;
    I : NATURAL;
    OPEN(DATA_FILE, IN_FILE, "test.dat");
    while not END_OF_FILE(DATA_FILE) loop
      Put_Line("TASK B executing ...");
    end loop;
  end B;

  procedure X is
    Put_Line("procedure X called.");
  end X;

  procedure Y is
    Put_Line("procedure Y called.");
  end Y;

  end loop;

**************** compilation session ************

fulton: /home/yk7m/ada/TEST $ ada -v -m os_task.ada -o os_task
IBM* AIX Ada/6000 Compiler (Release 2.0)
  Licensed Materials - Property of IBM
  5706-291 (C) Copyright IBM Corp. 1990, Copyright Telesoft 1989
  All Rights Reserved, US Government Users Restricted Rights - Use, duplication
  or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  * Trademark of International Business Machines
ada: Compiling file /lv2/users/yk7m/ada/TEST/os_task.ada...
  Date: 1992-Feb-25 15:45:34

    Middle-Pass          : test_os_task (specification)
    Code-Generator       : test_os_task (specification)

    Middle-Pass          : test_os_task (body)
    Code-Generator       : test_os_task (body)

    Library_Manager      : Library Permanently Updated

  No Errors Detected     Lines Compiled :  56
    Library_Manager      : Library Permanently Updated

Usage:  nm -[agnopru] [file ...]
ada: I was unable to use the archive file /lv2/users/yk7m/ada/TEST/adalib/adalib

Sun, 14 Aug 1994 05:00:25 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Motif binding for IBM AIX Ada/6000 ?

2. AIX Ada/6000 tasking problem

3. IBM AIX REXX/6000, Opinoins?

4. IBM AIX REXX/6000, Opinoins?

5. REXX On RS/6000 (AIX)

6. how to run program under REXX/6000 (aix)

7. How to install RS/6000 AIX/REXX??

8. REXX for AIX/6000

9. GNAT 3.03 for RS/6000 AIX 3.2 is available

10. Animator on RS/6000 AIX

11. Debugging Fortran on RS/6000 (AIX)

12. Reading Ethernet ID from Fortran or C on RS/6000 (AIX)


Powered by phpBB® Forum Software