Aix equivalents for following solaris library/system calls.

Aix equivalents for following solaris library/system calls.

Post by kum.. » Thu, 31 Aug 2000 04:00:00



 Hi :

Can someone guide me to the right place where i can find docs/exmaples
for use of following :

The followign are solaris calls which I need to implement in AIX:

a) memalign
Here is teh solaris description :
 void *memalign(size_t alignment, size_t size);
The memalign() function allocates size  bytes on a specified
     alignment  boundary  and  returns a pointer to the allocated
     block. The value of the returned address is guaranteed to be
     an even multiple of alignment. Note that the value of align-
     ment must be a power of two, and must  be  greater  than  or
     equal to the size of a word.

What is the AIX equivalent?

b)I need to implement priority control in AIX .  What are the AIX
  equivalents for the following Solaris shell (cmd) /library calls:

        /usr//bin//priocntl in solaris
        display or set scheduling parameters of specified
        process(es)
        The library call priocntl as shown below for solaris:
        long priocntl(idtype_t idtype, id_t id, int cmd, /*  arg  */
     ...);

the includes for this are:
     #include <sys/types.h>
     #include <sys/priocntl.h>
     #include <sys/rtpriocntl.h>
     #include <sys/tspriocntl.h>

What is the AIX equivalents for these commands/functions/includes

thank you.

often
cheers
mahesh

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Aix equivalents for following solaris library/system calls.

Post by James Carlso » Fri, 01 Sep 2000 20:21:06



>  void *memalign(size_t alignment, size_t size);

If you're doing that for page alignment, use valloc.  Otherwise,
something like this should do:

        void *
        memalign(size_t alignment, size_t size)
        {
                char *ptr;

                if ((ptr = malloc(size+alignment-1)) != NULL)
                        ptr = (char *)(
                                ((unsigned long)ptr + alignment - 1) &
                                ~(alignment-1));
                return ptr;
        }

Quote:> b)I need to implement priority control in AIX .  What are the AIX
>   equivalents for the following Solaris shell (cmd) /library calls:

I don't think there's a direct equivalent.  See "setpri" instead.

--

"PPP Design and Debugging" --- http://people.ne.mediaone.net/carlson/ppp