wine/include/shm_block.h
Alexandre Julliard b7258befe0 Release 950901
Thu Aug 31 17:19:57 1995  Alexandre Julliard  <julliard@sunsite.unc.edu>

	* [Configure]
	Added compile-time option for IPC.

	* [configure.in]
	Added command-line options for language, IPC and malloc
	debugging.

	* [controls/menu.c]
	WM_MENUSELECT was sometimes sent to the wrong window.

	* [debugger/break.c]
	For the 'next' command, only step over instruction that require
	it. This allows 'next' to do the right thing with jmp and ret
	instructions.

	* [ipc/*.c] [memory/atom.c] [memory/global.c]
	IPC can now be configured out at compile-time.

	* [loader/task.c]
	Bug fix in TASK_Reschedule() that could cause a task to be deleted
	twice.

	* [miscemu/dosmem.c] (New file)
	Partial emulation of the BIOS data segment.

	* [miscemu/instr.c]
	Trap attempts to access selector 0x40 and remap the access to
	segment __0040H.

	* [tools/build.c]
	Fixed bug in CallTo32_LargeStack() that caused problems when
	compiling Wine with the -fomit-frame-pointer option.

	* [windows/message.c]
	Fixed bug in hardware event handling that could cause some events
	to get ignored.

Sat Aug 26 13:12:59 IST 1995 Michael Veksler <mveksler@vnet.ibm.com>

	* [ipc/README] [ipc/dde.tex]
	LaTeX documentation for the ipc and DDE stuff.

Wed Aug 23 22:01:23 GMT 1995 Michael Veksler <mveksler@vnet.ibm.com>

	* [ipc/Imakefile] [ipc/wine_test_stub.c]
	Fixed IPC testing. Now it can be compiled with "make tests"

Wed Aug 23 21:04:14 1995  Fons Botman  <botman@wab-tis.rabobank.nl>

	* [if1632/kernel.spec] [include/windows.h] [misc/main.c]
	Added GetWinDebugInfo/SetWinDebugInfo stub for player.exe

Sun Aug  20 13:49:42 1995  Marcus Meissner  <msmeissn@faui01.informatik.uni-erlangen.de>

	* [miscemu/int21.c]
	Misc fix to int21,ah=40 (write) to match _lwrite().
	AX=0x440A (check if handle is remote) added.

	* [multimedia/mmsystem.c]
	Moved mciSendString to mcistring.c.

	* [multimedia/mcistring.c]
	New file, string interface for MCI (not complete, not thoroughly
	tested).

	* [multimedia/audio.c]
	IOCTL prints errors; one paranoid check disabled.

	* [misc/file.c]
	Misc operator precedence fixes.

	* [if1632/gdi.spec] [objects/bitblt.c]
	Stub for FastWindowFrame (parameters not correct).

Sat Aug 19 01:31:23 1995  Graham Menhennitt <gfm@werple.mira.net.au>

	* [loader/ne_image.c]
	Preliminary support for iterated segments.

Sat Aug 19 00:43:04 1995  Andrew Taylor  (andrew@riscan.com)

	* [windows/mapping.c]
	In function MAPPING_FixIsotropic(), VportExt[XY] is multiplied by
 	the absolute value of (ydim / xdim) or (xdim / ydim).

Thu Aug 15 23:00:16  Gregory Trubetskoy  <grisha@mira.com>

	* [objects/oembitmap.c]
	Added some includes for Windows 95.

	* [include/sysmetrics.h]
	Added some sysmetrics for Windows 95.

	* [include/bitmaps/*95]
	New files: obm_close_95, obm_closed_95, obm_reduce_95, obm_reduced_95
	obm_zoom_95, obm_zoomd_95 - these are some pixmaps for Windows 95.

Thu Aug 10 12:00:00 1995  Jan Willamowius  (jan@janhh.shnet.org)

	* [misc/shell.c] [rc/sysres*.rc]
	The caption of the ShellAbout dialog box is language specific and
 	should be defined in the resources.
1995-09-01 15:57:28 +00:00

90 lines
2.9 KiB
C

/***************************************************************************
* Copyright 1995, Technion, Israel Institute of Technology
* Electrical Eng, Software Lab.
* Author: Michael Veksler.
***************************************************************************
* File: shm_block.ch
* Purpose: treat a shared memory block.
***************************************************************************
*/
#ifndef __WINE_SHM_BLOCK_H
#define __WINE_SHM_BLOCK_H
#ifdef CONFIG_IPC
#include <sys/shm.h>
#include "wintypes.h"
#define SEGSIZE 0x10000 /* 64 */
#define SHM_GRANULARITY SEGSIZE
#define SHM_MINBLOCK SHM_GRANULARITY
#define SHM_MAXBLOCK (((int)SHMMAX/(int)SHM_GRANULARITY)* \
SHM_GRANULARITY)
#define PTR2REL(block,ptr) (REL_PTR) ( (char *) (ptr) - (char *) (block) )
#define REL2PTR(block,rel) (void *) ( (char *) (block) + (rel) )
typedef int REL_PTR;
/* full info for each shm block. */
struct shm_block {
/* private */
int next_shm_id; /* IPC shm ID (for initial linking) */
/* public (read only) */
int size; /* size of the shm block */
int free; /* how much of the block is free */
int proc_idx; /* The index of the owner */
/* public - writable for shm_fragment */
REL_PTR free_list; /* first item in the free list */
};
/* used for mapping local attachments */
struct local_shm_map {
struct local_shm_map *next;
int shm_id;
int proc_idx;
/* 32 bit pointer to the beginning of the block */
struct shm_block *ptr;
};
extern struct local_shm_map *shm_map;
void shm_setup_block(struct shm_block *block, REL_PTR first, int size);
/* shm_create_block:
* allocate and setup a new block:
* first - first non header byte.
* size - block size (in bytes).
* shm_id- IPC shared memory ID.
*/
struct shm_block *shm_create_block(REL_PTR first, int size, int *shm_id);
/* shm_locate_block:
* locate existing block according to shm_id,
* Attach the block if needed. Assume the shm_id is wine's
* Set selectors also.
*/
struct shm_block *shm_locate_block(int shm_id, struct local_shm_map *map);
/* shm_locate_attached_block:
* locate existing block according to shm_id,
* Blocks are never attached.
* if proc_idx is not NULL, it will be set to owner's index.
* map - localy mapped info about block may be NULL;
*/
struct shm_block *shm_locate_attached_block(int shm_id,
struct local_shm_map *map);
/* shm_attach_block: attach existing shm block, setup selectors
* shm_id - id of the block to attach.
* proc_idx - if not -1, puts this data into local mapping
* map - localy mapped info about this block. (may be NULL)
* NOTE: same block can be attached many times
*/
struct shm_block *shm_attach_block(int shm_id, int proc_idx,
struct local_shm_map *map);
/* delete chain of shm blocks (pointing to each other */
void shm_delete_chain(int *shmid);
#endif /* CONFIG_IPC */
#endif /* __WINE_SHM_BLOCK_H */