Skip to content

Pull glue out of trans #559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brson opened this issue Jun 23, 2011 · 1 comment
Closed

Pull glue out of trans #559

brson opened this issue Jun 23, 2011 · 1 comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Jun 23, 2011

middle::trans is huge. An easy way to make it smaller is pull out the glue-related stuff.

@graydon
Copy link
Contributor

graydon commented Feb 14, 2012

Long since obsolete.

@graydon graydon closed this as completed Feb 14, 2012
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
…hton

Add IPC,SHM,MSG for Freebsd

              INFO for the patch:
FREEBSD [https://github.com/freebsd/freebsd]

        /sys/sys/_types.h
typedef    long        __key_t;

        /sys/sys/types.h
typedef    __key_t        key_t;

        /sys/sys/ipc.h
#define    IPC_CREAT    001000
#define    IPC_EXCL    002000
#define    IPC_NOWAIT    004000
#define    IPC_PRIVATE    (key_t)0
#define    IPC_RMID    0
#define    IPC_SET     1
#define    IPC_STAT    2
#define    IPC_INFO    3

#define    IPC_R        000400
#define    IPC_W        000200
#define    IPC_M        010000

struct ipc_perm {
    uid_t        cuid;
    gid_t        cgid;
    uid_t        uid;
    gid_t        gid;
    mode_t        mode;
    unsigned short    seq;
    key_t        key;
};

key_t    ftok(const char *, int);

        /sys/sys/msg.h
#define MSG_NOERROR    010000

typedef    unsigned long    msglen_t;
typedef    unsigned long    msgqnum_t;

struct msqid_ds {
	struct	ipc_perm msg_perm;
	struct	msg *msg_first;
	struct	msg *msg_last;
	msglen_t msg_cbytes;
	msgqnum_t msg_qnum;
	msglen_t msg_qbytes;
	pid_t	msg_lspid;
	pid_t	msg_lrpid;
	time_t	msg_stime;
	time_t	msg_rtime;
	time_t	msg_ctime;
};

struct msg {
	struct	msg *msg_next;
	long	msg_type;
	u_short	msg_ts;
	short	msg_spot;
	struct	label *label;
};

struct msginfo {
    int    msgmax,
        msgmni,
        msgmnb,
        msgtql,
        msgssz,
        msgseg;
};

int msgctl(int, int, struct msqid_ds *);
int msgget(key_t, int);
ssize_t msgrcv(int, void *, size_t, long, int);
int msgsnd(int, const void *, size_t, int);

        /sys/sys/shm.h
#define SHM_RDONLY  010000
#define SHM_RND     020000
#define SHMLBA      PAGE_SIZE
#define SHM_R       (IPC_R)
#define SHM_W       (IPC_W)
#define SHM_LOCK    11
#define SHM_UNLOCK  12
#define SHM_STAT    13
#define SHM_INFO    14

typedef unsigned int shmatt_t;

struct shmid_ds {
    struct ipc_perm shm_perm;
    size_t          shm_segsz;
    pid_t           shm_lpid;
    pid_t           shm_cpid;
    shmatt_t        shm_nattch;
    time_t          shm_atime;
    time_t          shm_dtime;
    time_t          shm_ctime;
};

void *shmat(int, const void *, int);
int shmget(key_t, size_t, int);
int shmctl(int, int, struct shmid_ds *);
int shmdt(const void *);

	/sys/security/mac/mac_internal.h
#define	MAC_MAX_SLOTS	4
struct label {
	int		l_flags;
	intptr_t	l_perpolicy[MAC_MAX_SLOTS];
};
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Invariant loads

* alloc

* Fix for LLVM 9

Co-authored-by: Ubuntu <[email protected]>
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this issue Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants