source: rtems/cpukit/include/rtems/userenv.h @ 2996b9b

4.115
Last change on this file since 2996b9b was 21242c2, checked in by Joel Sherrill <joel.sherrill@…>, on 06/24/11 at 17:52:58

2011-06-24 Joel Sherrill <joel.sherrill@…>

  • include/rtems/bspIo.h, include/rtems/concat.h, include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h, include/rtems/pci.h, include/rtems/userenv.h, libblock/include/rtems/flashdisk.h, libblock/include/rtems/nvdisk-sram.h, libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h, libcsupport/include/console.h, libcsupport/include/iosupp.h, libcsupport/include/spurious.h, libcsupport/include/motorola/mc68230.h, libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h, libcsupport/include/rtems/framebuffer.h, libcsupport/include/rtems/gxx_wrappers.h, libcsupport/include/rtems/libcsupport.h, libcsupport/include/rtems/libio_.h, libcsupport/include/rtems/malloc.h, libcsupport/include/rtems/termiostypes.h, libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h, libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h, libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h, libmisc/capture/capture-cli.h, libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h, libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h, libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h, libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h, libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h, posix/include/mqueue.h, posix/include/semaphore.h, posix/include/rtems/posix/aio_misc.h, posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/posixapi.h, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/sigset.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h, posix/inline/rtems/posix/barrier.inl, posix/inline/rtems/posix/cond.inl, posix/inline/rtems/posix/mqueue.inl, posix/inline/rtems/posix/mutex.inl, posix/inline/rtems/posix/priority.inl, posix/inline/rtems/posix/pthread.inl, posix/inline/rtems/posix/rwlock.inl, posix/inline/rtems/posix/semaphore.inl, posix/inline/rtems/posix/spinlock.inl, posix/inline/rtems/posix/timer.inl, rtems/mainpage.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/timer.inl, rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h, sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h, score/include/rtems/score/object.h, score/include/rtems/score/priority.h, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl: Add @file Doxygen directives and descriptions to files which originated with RTEMS. This improves the file list page generated by Doxygen.
  • Property mode set to 100644
File size: 2.4 KB
Line 
1/**
2 * @file rtems/userenv.h
3 *
4 * This file defines the interface for POSIX per-process environment.
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2011.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#ifndef _RTEMS_USERENV_H
19#define _RTEMS_USERENV_H
20
21#include <rtems.h>
22#include <rtems/fs.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/*
29 *  External structures
30 */
31
32/*
33 * According to IEEE Std 1003.1-2001,
34 * limits.h is supposed to provide _POSIX_LOGIN_NAME_MAX
35 * FIXME: We should not rely on this.
36 */
37#include <limits.h>
38
39#ifndef LOGIN_NAME_MAX
40#ifdef _POSIX_LOGIN_NAME_MAX
41#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
42#else
43/* Fallback */
44#define LOGIN_NAME_MAX 9
45#endif
46#endif
47
48typedef struct {
49 rtems_id                         task_id;
50 rtems_filesystem_location_info_t current_directory;
51 rtems_filesystem_location_info_t root_directory;
52 /* Default mode for all files. */
53 mode_t                           umask;
54 nlink_t                          link_counts;
55 /* _POSIX_types */
56 uid_t                            uid;
57 gid_t                            gid;
58 uid_t                            euid;
59 gid_t                            egid;
60 char      login_buffer[LOGIN_NAME_MAX];
61
62 pid_t                            pgrp; /* process group id */
63} rtems_user_env_t;
64
65extern rtems_user_env_t * rtems_current_user_env;
66extern rtems_user_env_t   rtems_global_user_env;
67
68#define rtems_filesystem_current     (rtems_current_user_env->current_directory)
69#define rtems_filesystem_root        (rtems_current_user_env->root_directory)
70#define rtems_filesystem_link_counts (rtems_current_user_env->link_counts)
71#define rtems_filesystem_umask       (rtems_current_user_env->umask)
72
73#define _POSIX_types_Uid             (rtems_current_user_env->uid)
74#define _POSIX_types_Gid             (rtems_current_user_env->gid)
75#define _POSIX_types_Euid            (rtems_current_user_env->euid)
76#define _POSIX_types_Egid            (rtems_current_user_env->egid)
77#define _POSIX_types_Getlogin_buffer (rtems_current_user_env->login_buffer)
78
79
80/*
81 *  Instantiate a private copy of the per user information for the calling task.
82 */
83
84rtems_status_code rtems_libio_set_private_env(void);
85rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif
92/* end of include file */
Note: See TracBrowser for help on using the repository browser.