Back to index

glibc  2.9
Functions
mqueue2.h File Reference

Go to the source code of this file.

Functions

mqd_t mq_open (__const char *__name, int __oflag,...) __THROW __nonnull((1))
mqd_t __mq_open_2 (__const char *__name, int __oflag) __nonnull((1))
mqd_t __REDIRECT (__mq_open_alias,(__const char *__name, int __oflag,...), mq_open) __nonnull((1))
 __errordecl (__mq_open_wrong_number_of_args,"mq_open can be called either with 2 or 4 arguments")
 __errordecl (__mq_open_missing_mode_and_attr,"mq_open with O_CREAT in second argument needs 4 arguments")

Function Documentation

__errordecl ( __mq_open_wrong_number_of_args  ,
"mq_open can be called either with 2 or 4 arguments  
)
__errordecl ( __mq_open_missing_mode_and_attr  ,
"mq_open with O_CREAT in second argument needs 4 arguments  
)
mqd_t __mq_open_2 ( __const char *  __name,
int  __oflag 
)

Here is the caller graph for this function:

mqd_t __REDIRECT ( __mq_open_alias  ,
(__const char *__name, int __oflag,...)  ,
mq_open   
)
__extern_always_inline mqd_t mq_open ( __const char *  __name,
int  __oflag,
  ... 
)

Definition at line 37 of file mqueue2.h.

{
  if (__va_arg_pack_len () != 0 && __va_arg_pack_len () != 2)
    __mq_open_wrong_number_of_args ();

  if (__builtin_constant_p (__oflag))
    {
      if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () == 0)
       {
         __mq_open_missing_mode_and_attr ();
         return __mq_open_2 (__name, __oflag);
       }
      return __mq_open_alias (__name, __oflag, __va_arg_pack ());
    }

  if (__va_arg_pack_len () == 0)
    return __mq_open_2 (__name, __oflag);

  return __mq_open_alias (__name, __oflag, __va_arg_pack ());
}

Here is the call graph for this function:

Here is the caller graph for this function: