Skip to content

Commit e9b07e3

Browse files
committed
Improve documentation of '__djgpp_set_page_attributes'
Patch from Pali <pali@pali.im>.
1 parent 0d8be0f commit e9b07e3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/libc/dpmi/helper/setattr.txh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ of memory. @var{our_addr} and @var{num_bytes} must be page-aligned.
1616
If they are not page-aligned, @code{errno} will be set to @code{EINVAL}
1717
and the routine will fail.
1818

19+
Every page in the specified address range that begins at @var{out_addr}
20+
must belong to some DPMI handle in @code{__djgpp_memory_handle_list} which
21+
is managed by @code{sbrk} allocator (memory pointer can be obtained by
22+
e.g.@: @code{valloc}). If some page does not belong to some DJGPP DPMI
23+
handle, @code{errno} will be set to @code{EFAULT} and the routine will fail.
24+
1925
Consult DPMI documentation on function 0507H for the meaning of the
2026
@var{attributes} argument. Note: since 0507H is a DPMI service new
2127
with DPMI 1.0, this call will fail on most DPMI 0.9 servers. For your
@@ -27,8 +33,7 @@ Even on failure, this routine may affect a subset of the pages specified.
2733
@subheading Return Value
2834

2935
0 on success, -1 on failure. On failure, @code{errno} will be set to
30-
@code{EINVAL} for illegal input parameters, or @code{EACCES} if the
31-
DPMI server rejected the attribute setting.
36+
appropriate errno code and @code{__dpmi_error} to DPMI error code.
3237

3338
@subheading Portability
3439

0 commit comments

Comments
 (0)