mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-27 07:44:09 +02:00
changes from Japheth (HXDOS)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1170 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
92bb87ffaf
commit
d442e92e65
@ -256,10 +256,15 @@ static void interrupt far handler2f(intregs_t iregs) {
|
|||||||
iregs.ax = access_check
|
iregs.ax = access_check
|
||||||
(iregs.bx,
|
(iregs.bx,
|
||||||
iregs.cx,
|
iregs.cx,
|
||||||
|
#if 0
|
||||||
( ((((unsigned long)iregs.si)<<16) & 0xffff0000L) |
|
( ((((unsigned long)iregs.si)<<16) & 0xffff0000L) |
|
||||||
(((unsigned long)iregs.di) & 0xffffL) ),
|
(((unsigned long)iregs.di) & 0xffffL) ),
|
||||||
( ((((unsigned long)iregs.es)<<16) & 0xffff0000L) |
|
( ((((unsigned long)iregs.es)<<16) & 0xffff0000L) |
|
||||||
(((unsigned long)iregs.dx) & 0xffffL) ),
|
(((unsigned long)iregs.dx) & 0xffffL) ),
|
||||||
|
#else
|
||||||
|
( (((unsigned long)iregs.si)<<16) + iregs.di ),
|
||||||
|
( (((unsigned long)iregs.es)<<16) + iregs.dx ),
|
||||||
|
#endif
|
||||||
(iregs.ax & 0x01));
|
(iregs.ax & 0x01));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -269,10 +274,15 @@ static void interrupt far handler2f(intregs_t iregs) {
|
|||||||
iregs.ax = lock_unlock
|
iregs.ax = lock_unlock
|
||||||
(iregs.bx,
|
(iregs.bx,
|
||||||
iregs.cx,
|
iregs.cx,
|
||||||
|
#if 0
|
||||||
( ((((unsigned long)iregs.si)<<16) & 0xffff0000L) |
|
( ((((unsigned long)iregs.si)<<16) & 0xffff0000L) |
|
||||||
(((unsigned long)iregs.di) & 0xffffL) ),
|
(((unsigned long)iregs.di) & 0xffffL) ),
|
||||||
( ((((unsigned long)iregs.es)<<16) & 0xffff0000L) |
|
( ((((unsigned long)iregs.es)<<16) & 0xffff0000L) |
|
||||||
(((unsigned long)iregs.dx) & 0xffffL) ),
|
(((unsigned long)iregs.dx) & 0xffffL) ),
|
||||||
|
#else
|
||||||
|
( (((unsigned long)iregs.si)<<16) | ((unsigned long)iregs.di) ),
|
||||||
|
( (((unsigned long)iregs.es)<<16) | ((unsigned long)iregs.dx) ),
|
||||||
|
#endif
|
||||||
(iregs.ax & 0x01));
|
(iregs.ax & 0x01));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -529,6 +539,9 @@ static int lock_unlock
|
|||||||
|
|
||||||
if (len < 1L) return 0;
|
if (len < 1L) return 0;
|
||||||
|
|
||||||
|
/* there was a error in the code below preventing any other
|
||||||
|
than the first locked region to be unlocked (japheth, 09/2005) */
|
||||||
|
|
||||||
if (unlock) {
|
if (unlock) {
|
||||||
for (i = 0; i < lock_table_size; i++) {
|
for (i = 0; i < lock_table_size; i++) {
|
||||||
lptr = &lock_table[i];
|
lptr = &lock_table[i];
|
||||||
@ -540,10 +553,9 @@ static int lock_unlock
|
|||||||
lptr->used = 0;
|
lptr->used = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Not already locked by us; can't unlock. */
|
/* Not already locked by us; can't unlock. */
|
||||||
return -(0x21); /* lock violation */
|
return -(0x21); /* lock violation */
|
||||||
}
|
|
||||||
return -(0x24); /* sharing buffer overflow */
|
|
||||||
} else {
|
} else {
|
||||||
if (access_check(0, fileno, ofs, len, 0)) {
|
if (access_check(0, fileno, ofs, len, 0)) {
|
||||||
/* Already locked; can't lock. */
|
/* Already locked; can't lock. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user