Server for Information Technologies

(095) 932-9212, 932-9213, 939-0783
E-mail: info@citforum.ru
(!) CIT Forum CD-ROM

CREATSEM(3)
XENIX System V (21 1987)


creatsem - coae o ceaop

	int creatsem (sem_name, mode)
	char *sem_name;
	int mode;


creatsem opeee o ceaop c ee sem_name; paoa c ceaopo ye ocyecc y waitsem(3) sigsem(3) oep ceoo ocya pecypca, paee epee pec yaca popa. creatsem opaae ya oep ceaopa, sem_num, oop ae coyec oepax waitsem sigsem. Ceaop cac cea aa c yeo o. pocpaco, peaaeoe e aa, coyec xpae yaoo eaopa ceaopa. mode aae ocy ceaopy a e, a ooy ay. ocy ceaopy papee a ocoa a papee e; papeee ac oe oppyec.

C ceaopo oo paoa pa cxpooo xapaepa, a a waitsem sigsem. creatsem ycaaae ceaop eoopoe aaoe aee, opensem opae ceaop cooa eo poecco. Cxpooc pao c ceaopo apapye eeoc (epepaeoc) ceaopx oepa. p coyc peeo ceaopa, oope cac c a pecypco (a pece yac popa) eo a.

poecc, ypa ceaopo, oe o:

	sem_num = creatsem ("semaphore", mode);

coa, aa op ceaopa poecco. Bce pye poecc, coye ceaop, o o:

	sem_num = opensem ("semaphore");

oye ocya eo ae. ae, o poecc e oe op cooa ceaop, oop e apoa oo creatsem. poecc e oe op ceaop oee ooo paa eee ooo epoa pao. Ka coa, a opa poecc coy waitsem sigsem pao c ceaopo sem_num.

COECOC
creatsem oe cooa opeee ceaopo XENIX, epc 3, o e ceaopo XENIX System V.

.
opensem(3), waitsem(3), sigsem(3)


creatsem opaae aee -1 cyae oapye o. Ec ceaop c ee sem_num ye op cooa py poecca, errno aocc o o EEXIST. Ec yaa a cyecye, o e ee ceaopoo a, errno aocc ENOTNAM. Ec ceaop e apoa oo creatsem, errno aocc ENAVAIL.

AEA
oce oa creatsem eoxoo a waitsem oye ypae pa pecypco.

a ocoeoc cea XENIX oe ocycoa pyx peaax UNIX.

popa, coye y y, o oooac c ao -lx.
Comments: info@citmgu.ru
Designed by Andrey Novikov
Copyright © CIT