< prev index next >
src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c
Print this page
rev 59104 : imported patch serviceability
@@ -31,16 +31,12 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/time.h>
-#ifdef __solaris__
-#include <thread.h>
-#else
#include <pthread.h>
#include <poll.h>
-#endif
#include "socket_md.h"
#include "sysSocket.h"
int
@@ -275,39 +271,10 @@
strncpy(buf, msg, size-1);
buf[size-1] = '\0';
return 0;
}
-#ifdef __solaris__
-int
-dbgsysTlsAlloc() {
- thread_key_t tk;
- if (thr_keycreate(&tk, NULL)) {
- perror("thr_keycreate");
- exit(-1);
- }
- return (int)tk;
-}
-
-void
-dbgsysTlsFree(int index) {
- /* no-op */
-}
-
-void
-dbgsysTlsPut(int index, void *value) {
- thr_setspecific((thread_key_t)index, value) ;
-}
-
-void *
-dbgsysTlsGet(int index) {
- void* r = NULL;
- thr_getspecific((thread_key_t)index, &r);
- return r;
-}
-
-#else
int
dbgsysTlsAlloc() {
pthread_key_t key;
if (pthread_key_create(&key, NULL)) {
perror("pthread_key_create");
@@ -329,12 +296,10 @@
void *
dbgsysTlsGet(int index) {
return pthread_getspecific((pthread_key_t)index);
}
-#endif
-
long
dbgsysCurrentTimeMillis() {
struct timeval t;
gettimeofday(&t, 0);
return ((jlong)t.tv_sec) * 1000 + (jlong)(t.tv_usec/1000);
< prev index next >