diff options
| author | Tom Tromey | 2012-08-15 13:14:14 -0600 |
|---|---|---|
| committer | Tom Tromey | 2012-08-15 13:14:14 -0600 |
| commit | 8d3566c6a0eb3977c3115ae100a357f8d63cf77e (patch) | |
| tree | 7343b2236bdf20d5026483eb7f4dc15b76ee331a /src/print.c | |
| parent | fc196ac95224330384227da8f5706631701e3610 (diff) | |
| download | emacs-8d3566c6a0eb3977c3115ae100a357f8d63cf77e.tar.gz emacs-8d3566c6a0eb3977c3115ae100a357f8d63cf77e.zip | |
This adds names to mutexes. This seemed like a nice debugging
extension.
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/print.c b/src/print.c index 42e7241ecba..b14a769dc74 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1957,10 +1957,14 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1957 | } | 1957 | } |
| 1958 | else if (MUTEXP (obj)) | 1958 | else if (MUTEXP (obj)) |
| 1959 | { | 1959 | { |
| 1960 | int len; | ||
| 1961 | strout ("#<mutex ", -1, -1, printcharfun); | 1960 | strout ("#<mutex ", -1, -1, printcharfun); |
| 1962 | len = sprintf (buf, "%p", XMUTEX (obj)); | 1961 | if (STRINGP (XMUTEX (obj)->name)) |
| 1963 | strout (buf, len, len, printcharfun); | 1962 | print_string (XMUTEX (obj)->name, printcharfun); |
| 1963 | else | ||
| 1964 | { | ||
| 1965 | int len = sprintf (buf, "%p", XMUTEX (obj)); | ||
| 1966 | strout (buf, len, len, printcharfun); | ||
| 1967 | } | ||
| 1964 | PRINTCHAR ('>'); | 1968 | PRINTCHAR ('>'); |
| 1965 | } | 1969 | } |
| 1966 | else | 1970 | else |