aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/net.cc20
-rw-r--r--winsup/cygwin/select.cc2
-rw-r--r--winsup/cygwin/sigproc.cc2
-rw-r--r--winsup/cygwin/sigproc.h8
5 files changed, 23 insertions, 18 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9154876..127caff 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+Thu Sep 7 23:07:21 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * sigproc.h (sigframe::set): Eliminate second argument. Default bp to
+ current frame pointer rather than using this within the function, which
+ is unstable when this method is not inlined.
+ * net.cc: Eliminate use of second argument to sigframe.set throughout.
+ * select.cc (cygwin_select): Ditto.
+ * sigproc.cc (sig_send): Ditto.
+
Thu Sep 7 22:45:16 2000 Christopher Faylor <cgf@cygnus.com>
Break out more header info into separate files. Use appropriate
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index f140bdc..932428b 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -428,7 +428,7 @@ cygwin_sendto (int fd,
{
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
sockaddr_in sin;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
if (get_inet_addr (to, tolen, &sin, &tolen) == 0)
return -1;
@@ -454,7 +454,7 @@ cygwin_recvfrom (int fd,
int *fromlen)
{
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
debug_printf ("recvfrom %d", h->get_socket ());
@@ -611,7 +611,7 @@ cygwin_connect (int fd,
int res;
fhandler_socket *sock = get (fd);
sockaddr_in sin;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
if (get_inet_addr (name, namelen, &sin, &namelen) == 0)
return -1;
@@ -724,7 +724,7 @@ int
cygwin_accept (int fd, struct sockaddr *peer, int *len)
{
int res = -1;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
fhandler_socket *sock = get (fd);
if (sock)
@@ -910,7 +910,7 @@ int
cygwin_shutdown (int fd, int how)
{
int res = -1;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
fhandler_socket *sock = get (fd);
if (sock)
@@ -953,7 +953,7 @@ int
cygwin_recv (int fd, void *buf, int len, unsigned int flags)
{
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
int res = recv (h->get_socket (), (char *) buf, len, flags);
if (res == SOCKET_ERROR)
@@ -979,7 +979,7 @@ int
cygwin_send (int fd, const void *buf, int len, unsigned int flags)
{
fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
int res = send (h->get_socket (), (const char *) buf, len, flags);
if (res == SOCKET_ERROR)
@@ -1366,7 +1366,7 @@ cygwin_rcmd (char **ahost, unsigned short inport, char *locuser,
{
int res = -1;
SOCKET fd2s;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
int res_fd = fdtab.find_unused_handle ();
if (res_fd == -1)
@@ -1406,7 +1406,7 @@ int
cygwin_rresvport (int *port)
{
int res = -1;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
int res_fd = fdtab.find_unused_handle ();
if (res_fd == -1)
@@ -1435,7 +1435,7 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser,
{
int res = -1;
SOCKET fd2s;
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
int res_fd = fdtab.find_unused_handle ();
if (res_fd == -1)
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index b52471a..bcaf4a4 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -119,7 +119,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
fd_set *dummy_readfds = allocfd_set (maxfds);
fd_set *dummy_writefds = allocfd_set (maxfds);
fd_set *dummy_exceptfds = allocfd_set (maxfds);
- sigframe thisframe (mainthread, 0);
+ sigframe thisframe (mainthread);
#if 0
if (n > FD_SETSIZE)
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 46342ba..8372cb0 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -785,7 +785,7 @@ sig_send (_pinfo *p, int sig, DWORD ebp)
{
thiscatch = sigcatch_main;
thiscomplete = sigcomplete_main;
- thisframe.set (mainthread, 1, ebp);
+ thisframe.set (mainthread, ebp);
}
}
else if (!(thiscatch = getsem (p, "sigcatch", 0, 0)))
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index c863402..915e54a 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -49,15 +49,11 @@ private:
sigthread *st;
public:
- void set (sigthread &t, int up = 1, DWORD ebp = 0)
+ void set (sigthread &t, DWORD ebp = (DWORD) __builtin_frame_address (0))
{
t.lock->acquire ();
st = &t;
- if (ebp)
- t.frame = ebp;
- else
- t.frame = (DWORD) (up ? __builtin_frame_address (1) :
- __builtin_frame_address (0));
+ t.frame = ebp;
t.lock->release ();
}